Prevent other accounts message notification header to be displayed when a message is received on the default account

This commit is contained in:
Sylvain Berfini 2024-09-29 14:06:27 +02:00
parent 5ebb4ee6ac
commit 92ec1940e5

View file

@ -169,7 +169,10 @@ class MainViewModel @UiThread constructor() : ViewModel() {
messages: Array<out ChatMessage>
) {
Log.i("$TAG Message(s) received, updating notifications count if needed")
computeNonDefaultAccountNotificationsCount()
val account = LinphoneUtils.getAccountForAddress(chatRoom.localAddress)
if (account != null && account != core.defaultAccount) {
computeNonDefaultAccountNotificationsCount()
}
}
@WorkerThread