mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
No longer need to remove reply action from message notification
This commit is contained in:
parent
91df15c022
commit
87153679a3
1 changed files with 1 additions and 14 deletions
|
|
@ -69,7 +69,6 @@ import org.linphone.core.MediaDirection
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.ui.call.CallActivity
|
||||
import org.linphone.ui.main.MainActivity
|
||||
import org.linphone.ui.main.model.isEndToEndEncryptionMandatory
|
||||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
|
@ -699,7 +698,6 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
notifiable.isGroup = true
|
||||
notifiable.groupTitle = chatRoom.subject
|
||||
}
|
||||
notifiable.isEncrypted = chatRoom.hasCapability(ChatRoom.Capabilities.Encrypted.toInt())
|
||||
|
||||
for (message in chatRoom.unreadHistory) {
|
||||
if (message.isRead || message.isOutgoing) continue
|
||||
|
|
@ -1075,6 +1073,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
.setStyle(style)
|
||||
.setContentIntent(pendingIntent)
|
||||
.addAction(getMarkMessageAsReadAction(notifiable))
|
||||
.addAction(getReplyMessageAction(notifiable))
|
||||
.setShortcutId(id)
|
||||
.setLocusId(LocusIdCompat(id))
|
||||
|
||||
|
|
@ -1082,17 +1081,6 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
notificationBuilder.addPerson(person)
|
||||
}
|
||||
|
||||
if (notifiable.isEncrypted) {
|
||||
notificationBuilder.addAction(getReplyMessageAction(notifiable))
|
||||
} else {
|
||||
val account = coreContext.core.accountList.find {
|
||||
it.params.identityAddress?.asStringUriOnly() == notifiable.localIdentity
|
||||
}
|
||||
if (account != null && !account.isEndToEndEncryptionMandatory()) {
|
||||
notificationBuilder.addAction(getReplyMessageAction(notifiable))
|
||||
}
|
||||
}
|
||||
|
||||
return notificationBuilder.build()
|
||||
}
|
||||
|
||||
|
|
@ -1424,7 +1412,6 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
var remoteAddress: String? = null
|
||||
|
||||
var isGroup: Boolean = false
|
||||
var isEncrypted: Boolean = false
|
||||
var groupTitle: String? = null
|
||||
val messages: ArrayList<NotifiableMessage> = arrayListOf()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue