refac
This commit is contained in:
@@ -934,15 +934,19 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$: if (history) {
|
const onHistoryChange = (history) => {
|
||||||
cancelAnimationFrame(contentsRAF);
|
if (history) {
|
||||||
contentsRAF = requestAnimationFrame(() => {
|
cancelAnimationFrame(contentsRAF);
|
||||||
getContents();
|
contentsRAF = requestAnimationFrame(() => {
|
||||||
contentsRAF = null;
|
getContents();
|
||||||
});
|
contentsRAF = null;
|
||||||
} else {
|
});
|
||||||
artifactContents.set([]);
|
} else {
|
||||||
}
|
artifactContents.set([]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$: onHistoryChange(history);
|
||||||
|
|
||||||
const getContents = () => {
|
const getContents = () => {
|
||||||
const messages = history ? createMessagesList(history, history.currentId) : [];
|
const messages = history ? createMessagesList(history, history.currentId) : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user