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