mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Set Revision expanded state only on first mount
Instead of recalculating the expanded state of a revision on any `patch.revisions` variable change, we should just use it once on Mount and then let the `Revision` component manage their expanded state internally.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
import Thread from "@app/components/Thread.svelte";
|
||||
|
||||
export let baseUrl: BaseUrl;
|
||||
export let expanded: boolean = false;
|
||||
export let initialExpanded: boolean = false;
|
||||
export let rawPath: (commit?: string) => string;
|
||||
export let patchId: string;
|
||||
export let patchState: PatchState;
|
||||
@@ -64,6 +64,7 @@
|
||||
| ((commentId: string, comment: string, embeds: Embed[]) => Promise<void>)
|
||||
| undefined;
|
||||
|
||||
let expanded = initialExpanded;
|
||||
const api = new HttpdClient(baseUrl);
|
||||
const latestEdit = revisionEdits.pop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user