From 010588ee7c4064d01b10e75a69ac5e89ae839233 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 30 Jun 2023 11:38:22 -0500 Subject: [PATCH] Fix thread muting (#932) --- src/state/models/content/post-thread-item.ts | 3 ++- src/view/com/post-thread/PostThreadItem.tsx | 2 +- src/view/com/post/Post.tsx | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/state/models/content/post-thread-item.ts b/src/state/models/content/post-thread-item.ts index c3341550..9b8f42b3 100644 --- a/src/state/models/content/post-thread-item.ts +++ b/src/state/models/content/post-thread-item.ts @@ -61,8 +61,9 @@ export class PostThreadItemModel { } return this.post.uri } + get isThreadMuted() { - return this.rootStore.mutedThreads.uris.has(this.rootUri) + return this.data.isThreadMuted } get labelInfo(): PostLabelInfo { diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 692fac9e..c691e7f3 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -114,7 +114,7 @@ export const PostThreadItem = observer(function PostThreadItem({ try { await item.toggleThreadMute() if (item.isThreadMuted) { - Toast.show('You will no longer received notifications for this thread') + Toast.show('You will no longer receive notifications for this thread') } else { Toast.show('You will now receive notifications for this thread') } diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index fac27b84..c74abb89 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -178,9 +178,7 @@ const PostLoaded = observer( try { await item.toggleThreadMute() if (item.isThreadMuted) { - Toast.show( - 'You will no longer received notifications for this thread', - ) + Toast.show('You will no longer receive notifications for this thread') } else { Toast.show('You will now receive notifications for this thread') }