mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-18 05:58:25 +00:00
Fixed issue in previous commit
This commit is contained in:
parent
b16b42ce55
commit
15603e7933
3 changed files with 7 additions and 7 deletions
|
|
@ -222,8 +222,8 @@ class CorePreferences
|
|||
}
|
||||
|
||||
@get:AnyThread @set:WorkerThread
|
||||
var hideChatMessageContentInNotification: Boolean
|
||||
get() = config.getBool("ui", "display_notification_content", false)
|
||||
var showChatMessageContentInNotification: Boolean
|
||||
get() = config.getBool("ui", "display_notification_content", true)
|
||||
set(value) {
|
||||
config.setBool("ui", "display_notification_content", value)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1600,10 +1600,10 @@ class NotificationsManager
|
|||
}
|
||||
|
||||
val senderPerson = if (message.isOutgoing) null else person // Use null for ourselves
|
||||
val text = if (corePreferences.hideChatMessageContentInNotification) {
|
||||
AppUtils.getString(R.string.notification_chat_message_hidden_content)
|
||||
} else {
|
||||
val text = if (corePreferences.showChatMessageContentInNotification) {
|
||||
message.message
|
||||
} else {
|
||||
AppUtils.getString(R.string.notification_chat_message_hidden_content)
|
||||
}
|
||||
val tmp = NotificationCompat.MessagingStyle.Message(
|
||||
text,
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ class SettingsViewModel
|
|||
markAsReadWhenDismissingNotification.postValue(
|
||||
corePreferences.markConversationAsReadWhenDismissingMessageNotification
|
||||
)
|
||||
hideMessageContentInNotification.postValue(corePreferences.hideChatMessageContentInNotification)
|
||||
hideMessageContentInNotification.postValue(!corePreferences.showChatMessageContentInNotification)
|
||||
|
||||
sortContactsBy.postValue(if (corePreferences.sortContactsByFirstName) 0 else 1)
|
||||
editNativeContactsInLinphone.postValue(corePreferences.editNativeContactsInLinphone)
|
||||
|
|
@ -580,7 +580,7 @@ class SettingsViewModel
|
|||
fun toggleHideMessageContentInNotification() {
|
||||
val newValue = hideMessageContentInNotification.value == false
|
||||
coreContext.postOnCoreThread {
|
||||
corePreferences.hideChatMessageContentInNotification = newValue
|
||||
corePreferences.showChatMessageContentInNotification = !newValue
|
||||
hideMessageContentInNotification.postValue(newValue)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue