mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Queue all the microtasks
This commit is contained in:
parent
71d2db31e0
commit
a97478097b
1 changed files with 13 additions and 9 deletions
|
@ -175,6 +175,7 @@ export function saveStatus(status, instance, opts) {
|
|||
if (!status) return;
|
||||
const oldStatus = getStatus(status.id, instance);
|
||||
if (!override && oldStatus) return;
|
||||
queueMicrotask(() => {
|
||||
const key = statusKey(status.id, instance);
|
||||
if (oldStatus?._pinned) status._pinned = oldStatus._pinned;
|
||||
// if (oldStatus?._filtered) status._filtered = oldStatus._filtered;
|
||||
|
@ -183,13 +184,16 @@ export function saveStatus(status, instance, opts) {
|
|||
const key = statusKey(status.reblog.id, instance);
|
||||
states.statuses[key] = status.reblog;
|
||||
}
|
||||
});
|
||||
|
||||
// THREAD TRAVERSER
|
||||
if (!skipThreading) {
|
||||
queueMicrotask(() => {
|
||||
threadifyStatus(status, instance);
|
||||
if (status.reblog) {
|
||||
queueMicrotask(() => {
|
||||
threadifyStatus(status.reblog, instance);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue