From 001f8038bfece8a49c62867c2ca2d2d088a3727e Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Sun, 14 May 2023 13:45:36 -0700 Subject: [PATCH] remove duplicate --- packages/client/src/scripts/get-note-menu.ts | 34 ++++---------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 1ec36d1ef4..d8e47ff437 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -70,15 +70,6 @@ export function getNoteMenu(props: { }); } - function duplicate(): void { - os.post({ - initialNote: appearNote, - renote: appearNote.renote, - reply: appearNote.reply, - channel: appearNote.channel, - }); - } - function toggleFavorite(favorite: boolean): void { os.apiWithDialog( favorite ? "notes/favorites/create" : "notes/favorites/delete", @@ -284,6 +275,13 @@ export function getNoteMenu(props: { null, ] : []), + instance.features.postEditing && isAppearAuthor + ? { + icon: "ph-pencil-line ph-bold ph-lg", + text: i18n.ts.edit, + action: edit, + } + : undefined, { icon: "ph-smiley ph-bold ph-lg", text: i18n.ts.reaction, @@ -421,24 +419,6 @@ export function getNoteMenu(props: { null, - instance.features.postEditing && isAppearAuthor - ? { - icon: "ph-pencil-line ph-bold ph-lg", - text: i18n.ts.edit, - textStyle: "color: var(--accent)", - action: edit, - } - : undefined, - - instance.features.postEditing - ? { - icon: "ph-copy ph-bold ph-lg", - text: i18n.ts.duplicate, - textStyle: "color: var(--accent)", - action: duplicate, - } - : undefined, - isAppearAuthor || isModerator ? { icon: "ph-trash ph-bold ph-lg",