mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed issue in previous fix preventing opening a conversation from a chat message notification
This commit is contained in:
parent
d03f94d52a
commit
d5d3cc0bc2
2 changed files with 8 additions and 10 deletions
|
|
@ -910,12 +910,6 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (!viewModel.isChatRoomInitialized()) {
|
||||
Log.w("$TAG Fragment resuming but no chatRoom in viewModel, going back")
|
||||
goBack()
|
||||
return
|
||||
}
|
||||
|
||||
viewModel.updateCurrentlyDisplayedConversation()
|
||||
|
||||
// Wait for items to be displayed
|
||||
|
|
|
|||
|
|
@ -450,11 +450,15 @@ class ConversationViewModel @UiThread constructor() : AbstractConversationViewMo
|
|||
@UiThread
|
||||
fun updateCurrentlyDisplayedConversation() {
|
||||
coreContext.postOnCoreThread {
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Asking notifications manager not to notify messages for conversation [$id]")
|
||||
coreContext.notificationsManager.setCurrentlyDisplayedChatRoomId(id)
|
||||
if (isChatRoomInitialized()) {
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i(
|
||||
"$TAG Asking notifications manager not to notify messages for conversation [$id]"
|
||||
)
|
||||
coreContext.notificationsManager.setCurrentlyDisplayedChatRoomId(id)
|
||||
|
||||
checkIfConversationShouldBeDisabledForSecurityReasons()
|
||||
checkIfConversationShouldBeDisabledForSecurityReasons()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue