mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +08:00
Change the sidebar filter to match new patch state
When changing the state of a patch we want the sidebar filter to reflect that, otherwise the patch just disappears from the sidebar unless the user selected "show all states".
This commit is contained in:
committed by
Sebastian Martinez
parent
32ca4dc48d
commit
63d1c87c7f
@@ -49,12 +49,20 @@
|
||||
}
|
||||
|
||||
/* eslint-disable prefer-const */
|
||||
let { repo, patch, patches, revisions, config, status }: Props = $props();
|
||||
let {
|
||||
repo,
|
||||
patch,
|
||||
patches,
|
||||
revisions,
|
||||
config,
|
||||
status: initialStatus,
|
||||
}: Props = $props();
|
||||
/* eslint-enable prefer-const */
|
||||
|
||||
let cursor = patches.cursor;
|
||||
let more = patches.more;
|
||||
let items = $state(patches.content);
|
||||
let status = $state(initialStatus);
|
||||
let editingTitle = $state(false);
|
||||
let updatedTitle = $state("");
|
||||
let labelSaveInProgress: boolean = $state(false);
|
||||
@@ -238,6 +246,9 @@
|
||||
},
|
||||
opts: { announce: $nodeRunning && $announce },
|
||||
});
|
||||
if (initialStatus !== undefined) {
|
||||
status = state["status"];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Changing patch state failed", error);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user