summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-09-24 10:39:17 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-09-24 10:39:17 +0900
commit0f7cbb59228d3dfc86c153d25d8fcbf8e2a244e3 (patch)
tree1ac642aaa4f89529c53d95b868fa799a74e6b4c4 /packages
parentfix type (diff)
downloadsharkey-0f7cbb59228d3dfc86c153d25d8fcbf8e2a244e3.tar.gz
sharkey-0f7cbb59228d3dfc86c153d25d8fcbf8e2a244e3.tar.bz2
sharkey-0f7cbb59228d3dfc86c153d25d8fcbf8e2a244e3.zip
fix type
Diffstat (limited to 'packages')
-rw-r--r--packages/backend/src/server/api/endpoints/notes/state.ts4
-rw-r--r--packages/client/src/scripts/get-note-menu.ts19
2 files changed, 2 insertions, 21 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts
index a02b8d2559..d0036f0fb7 100644
--- a/packages/backend/src/server/api/endpoints/notes/state.ts
+++ b/packages/backend/src/server/api/endpoints/notes/state.ts
@@ -16,10 +16,6 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
- isWatching: {
- type: 'boolean',
- optional: false, nullable: false,
- },
isMutedThread: {
type: 'boolean',
optional: false, nullable: false,
diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts
index a5cf982066..692986cd55 100644
--- a/packages/client/src/scripts/get-note-menu.ts
+++ b/packages/client/src/scripts/get-note-menu.ts
@@ -60,12 +60,6 @@ export function getNoteMenu(props: {
});
}
- function toggleWatch(watch: boolean): void {
- os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', {
- noteId: appearNote.id,
- });
- }
-
function toggleThreadMute(mute: boolean): void {
os.apiWithDialog(mute ? 'notes/thread-muting/create' : 'notes/thread-muting/delete', {
noteId: appearNote.id,
@@ -245,15 +239,6 @@ export function getNoteMenu(props: {
text: i18n.ts.clip,
action: () => clip(),
},
- (appearNote.userId !== $i.id) ? statePromise.then(state => state.isWatching ? {
- icon: 'fas fa-eye-slash',
- text: i18n.ts.unwatch,
- action: () => toggleWatch(false),
- } : {
- icon: 'fas fa-eye',
- text: i18n.ts.watch,
- action: () => toggleWatch(true),
- }) : undefined,
statePromise.then(state => state.isMutedThread ? {
icon: 'fas fa-comment-slash',
text: i18n.ts.unmuteThread,
@@ -312,7 +297,7 @@ export function getNoteMenu(props: {
}]
: []
)]
- .filter(x => x !== undefined);
+ .filter(x => x !== undefined);
} else {
menu = [{
icon: 'fas fa-copy',
@@ -329,7 +314,7 @@ export function getNoteMenu(props: {
window.open(appearNote.url || appearNote.uri, '_blank');
},
} : undefined]
- .filter(x => x !== undefined);
+ .filter(x => x !== undefined);
}
if (noteActions.length > 0) {