Compare commits
2 commits
44c9e55928
...
2836e857ad
Author | SHA1 | Date | |
---|---|---|---|
|
2836e857ad | ||
|
23dc34dbbf |
2 changed files with 20 additions and 19 deletions
|
@ -288,11 +288,13 @@ export function createTimeline<
|
|||
}
|
||||
});
|
||||
|
||||
untrack(() => {
|
||||
for (const status of chk.chunk) {
|
||||
const node = untrack(() => lookup.get(status.id))!;
|
||||
const parent = untrack(() =>
|
||||
status.inReplyToId ? lookup.get(status.inReplyToId) : undefined,
|
||||
);
|
||||
const node = lookup.get(status.id)!;
|
||||
const parent = status.inReplyToId
|
||||
? lookup.get(status.inReplyToId)
|
||||
: undefined;
|
||||
|
||||
if (parent) {
|
||||
const children = parent.children ?? [];
|
||||
if (!children.find((x) => x.value.id == status.id)) {
|
||||
|
@ -302,6 +304,7 @@ export function createTimeline<
|
|||
node.parent = parent;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const nThreadIds = chk.chunk
|
||||
.filter((x, i) => !existence[i])
|
||||
|
@ -314,11 +317,13 @@ export function createTimeline<
|
|||
setThreads((threads) => [...nThreadIds, ...threads]);
|
||||
}
|
||||
|
||||
untrack(() => {
|
||||
setThreads((threads) =>
|
||||
threads.filter((id) => (lookup.get(id)!.children?.length ?? 0) === 0),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return [
|
||||
{
|
||||
|
|
|
@ -3,8 +3,6 @@ import {
|
|||
createMemo,
|
||||
createRenderEffect,
|
||||
createSignal,
|
||||
createUniqueId,
|
||||
onMount,
|
||||
Show,
|
||||
type Accessor,
|
||||
type Component,
|
||||
|
@ -43,14 +41,12 @@ import {
|
|||
} from "@suid/icons-material";
|
||||
import type { Account } from "../accounts/stores";
|
||||
import "./TootComposer.css";
|
||||
import { makeEventListener } from "@solid-primitives/event-listener";
|
||||
import BottomSheet from "../material/BottomSheet";
|
||||
import { useLanguage } from "../platform/i18n";
|
||||
import iso639_1 from "iso-639-1";
|
||||
import ChooseTootLang from "./ChooseTootLang";
|
||||
import type { mastodon } from "masto";
|
||||
import cardStyles from "../material/cards.module.css";
|
||||
import { Title } from "../material/typography";
|
||||
import Menu, { createManagedMenuState } from "../material/Menu";
|
||||
import { useDefaultSession } from "../masto/clients";
|
||||
import { resolveCustomEmoji } from "../masto/toot";
|
||||
|
|
Loading…
Reference in a new issue