mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Add announce preference to settings
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
} from "@app/lib/utils";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
import { announce } from "@app/components/AnnounceSwitch.svelte";
|
||||
|
||||
import Border from "@app/components/Border.svelte";
|
||||
import CommentComponent from "@app/components/Comment.svelte";
|
||||
import CommentToggleInput from "@app/components/CommentToggleInput.svelte";
|
||||
@@ -36,7 +38,6 @@
|
||||
export let issues: Issue[];
|
||||
export let config: Config;
|
||||
|
||||
const announce = false;
|
||||
let topLevelReplyOpen = false;
|
||||
|
||||
// Close the comment textbox when switching between issues. The view doesn't
|
||||
@@ -91,7 +92,7 @@
|
||||
await invoke("create_issue_comment", {
|
||||
rid: repo.rid,
|
||||
new: { id: issue.id, body, embeds },
|
||||
opts: { announce },
|
||||
opts: { announce: $announce },
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Comment creation failed: ", error);
|
||||
@@ -105,7 +106,7 @@
|
||||
await invoke("create_issue_comment", {
|
||||
rid: repo.rid,
|
||||
new: { id: issue.id, body, embeds, replyTo },
|
||||
opts: { announce },
|
||||
opts: { announce: $announce },
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Comment reply creation failed", error);
|
||||
@@ -125,7 +126,7 @@
|
||||
body,
|
||||
embeds,
|
||||
},
|
||||
opts: { announce },
|
||||
opts: { announce: $announce },
|
||||
});
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
@@ -154,7 +155,7 @@
|
||||
({ did }) => publicKeyFromDid(did) === publicKey,
|
||||
),
|
||||
},
|
||||
opts: { announce },
|
||||
opts: { announce: $announce },
|
||||
});
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
|
||||
Reference in New Issue
Block a user