Merge branch 'develop' into pag-back

This commit is contained in:
tamaina
2023-07-24 06:12:24 +00:00
8 changed files with 26 additions and 15 deletions

View File

@@ -108,8 +108,7 @@ function waitForDecode() {
.then(() => {
loaded = true;
}, error => {
console.error('Error occurred during decoding image', img.value, error);
throw Error(error);
console.log('Error occurred during decoding image', img.value, error);
});
} else {
loaded = false;

View File

@@ -57,14 +57,6 @@ const prepend = note => {
}
};
const onUserAdded = () => {
tlComponent?.pagingComponent?.reload();
};
const onUserRemoved = () => {
tlComponent?.pagingComponent?.reload();
};
let endpoint;
let query;
let connection;
@@ -144,8 +136,6 @@ if (props.src === 'antenna') {
listId: props.list,
});
connection.on('note', prepend);
connection.on('userAdded', onUserAdded);
connection.on('userRemoved', onUserRemoved);
} else if (props.src === 'channel') {
endpoint = 'channels/timeline';
query = {

View File

@@ -28,6 +28,7 @@ const common = {
template: '<MkAd v-bind="props" />',
};
},
/* FIXME: disabled because it still didnt pass after applying #11267
async play({ canvasElement, args }) {
if (lock) {
console.warn('This test is unexpectedly running twice in parallel, fix it!');
@@ -77,6 +78,7 @@ const common = {
lock = undefined;
}
},
*/
args: {
prefer: [],
specify: {

View File

@@ -1,3 +1,20 @@
const requestIdleCallback: typeof globalThis.requestIdleCallback = globalThis.requestIdleCallback ?? ((callback) => {
const start = performance.now();
const timeoutId = setTimeout(() => {
callback({
didTimeout: false, // polyfill でタイムアウト発火することはない
timeRemaining() {
const diff = performance.now() - start;
return Math.max(0, 50 - diff); // <https://www.w3.org/TR/requestidlecallback/#idle-periods>
},
});
});
return timeoutId;
});
const cancelIdleCallback: typeof globalThis.cancelIdleCallback = globalThis.cancelIdleCallback ?? ((timeoutId) => {
clearTimeout(timeoutId);
});
class IdlingRenderScheduler {
#renderers: Set<FrameRequestCallback>;
#rafId: number;