mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-24 02:22:11 +02:00
fix(better_notifications): stealth mode rule
This commit is contained in:
parent
59a3b7f26a
commit
ab13ea4bc1
@ -1444,8 +1444,7 @@
|
|||||||
"reply": "Reply",
|
"reply": "Reply",
|
||||||
"download": "Download",
|
"download": "Download",
|
||||||
"mark_as_read": "Mark as Read"
|
"mark_as_read": "Mark as Read"
|
||||||
},
|
}
|
||||||
"stealth_mode_notice": "Can't mark as read in stealth mode"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"profile_picture_downloader": {
|
"profile_picture_downloader": {
|
||||||
|
@ -209,13 +209,9 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN
|
|||||||
}
|
}
|
||||||
ACTION_MARK_AS_READ -> {
|
ACTION_MARK_AS_READ -> {
|
||||||
runCatching {
|
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
|
val conversationManager = context.feature(Messaging::class).conversationManager ?: return@subscribe
|
||||||
|
|
||||||
|
context.feature(StealthMode::class).addDisplayedMessageException(clientMessageId)
|
||||||
conversationManager.displayedMessages(
|
conversationManager.displayedMessages(
|
||||||
conversationId,
|
conversationId,
|
||||||
clientMessageId,
|
clientMessageId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user