commit ab13ea4bc10792790ae67bb0e75a633c8ab052dd
parent 59a3b7f26ad88c6d8c5ddade7612eae0966159de
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Thu, 23 May 2024 00:57:14 +0200

fix(better_notifications): stealth mode rule

Diffstat:
Mcommon/src/main/assets/lang/en_US.json | 3+--
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt | 6+-----
2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json @@ -1444,8 +1444,7 @@ "reply": "Reply", "download": "Download", "mark_as_read": "Mark as Read" - }, - "stealth_mode_notice": "Can't mark as read in stealth mode" + } }, "profile_picture_downloader": { diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt @@ -209,13 +209,9 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN } ACTION_MARK_AS_READ -> { runCatching { - if (context.feature(StealthMode::class).canUseRule(conversationId)) { - context.longToast(translations["stealth_mode_notice"]) - return@subscribe - } - val conversationManager = context.feature(Messaging::class).conversationManager ?: return@subscribe + context.feature(StealthMode::class).addDisplayedMessageException(clientMessageId) conversationManager.displayedMessages( conversationId, clientMessageId,