fix(core/better_notifications): handle status message

- add new content types
This commit is contained in:
rhunk
2023-11-08 19:24:15 +01:00
parent 81f626cc3b
commit 4bf421441b
4 changed files with 66 additions and 26 deletions

View File

@ -605,8 +605,8 @@
"always_dark": "Always Dark"
},
"better_notifications": {
"chat": "Show chat messages",
"snap": "Show media",
"chat_preview": "Show a preview of chat",
"media_preview": "Show a preview of media",
"reply_button": "Add reply button",
"download_button": "Add download button",
"mark_as_read_button": "Mark as Read button",
@ -722,6 +722,29 @@
"anti_auto_save": "Anti Auto Save"
},
"content_type": {
"CHAT": "Chat",
"SNAP": "Snap",
"EXTERNAL_MEDIA": "External Media",
"NOTE": "Audio Note",
"STICKER": "Sticker",
"STATUS": "Status",
"LOCATION": "Location",
"STATUS_SAVE_TO_CAMERA_ROLL": "Saved to Camera Roll",
"STATUS_CONVERSATION_CAPTURE_SCREENSHOT": "Screenshot",
"STATUS_CONVERSATION_CAPTURE_RECORD": "Screen Record",
"STATUS_CALL_MISSED_VIDEO": "Missed Video Call",
"STATUS_CALL_MISSED_AUDIO": "Missed Audio Call",
"LIVE_LOCATION_SHARE": "Live Location Share",
"CREATIVE_TOOL_ITEM": "Creative Tool Item",
"FAMILY_CENTER_INVITE": "Family Center Invite",
"FAMILY_CENTER_ACCEPT": "Family Center Accept",
"FAMILY_CENTER_LEAVE": "Family Center Leave",
"STATUS_PLUS_GIFT": "Status Plus Gift",
"TINY_SNAP": "Tiny Snap",
"STATUS_COUNTDOWN": "Countdown"
},
"chat_action_menu": {
"preview_button": "Preview",
"download_button": "Download",

View File

@ -24,7 +24,7 @@ class MessagingTweaks : ConfigContainer() {
nativeHooks()
}
val instantDelete = boolean("instant_delete") { requireRestart() }
val betterNotifications = multiple("better_notifications", "snap", "chat", "reply_button", "download_button", "mark_as_read_button", "group") { requireRestart() }
val betterNotifications = multiple("better_notifications", "chat_preview", "media_preview", "reply_button", "download_button", "mark_as_read_button", "group") { requireRestart() }
val notificationBlacklist = multiple("notification_blacklist", *NotificationType.getIncomingValues().map { it.key }.toTypedArray()) {
customOptionTranslationPath = "features.options.notifications"
}

View File

@ -71,7 +71,9 @@ enum class ContentType(val id: Int) {
FAMILY_CENTER_INVITE(15),
FAMILY_CENTER_ACCEPT(16),
FAMILY_CENTER_LEAVE(17),
STATUS_PLUS_GIFT(18);
STATUS_PLUS_GIFT(18),
TINY_SNAP(19),
STATUS_COUNTDOWN(20);
companion object {
fun fromId(i: Int): ContentType {