From 560e454d5e25cab971b8597fcea8d6e8a2210515 Mon Sep 17 00:00:00 2001 From: rapterjet2004 Date: Thu, 6 Jun 2024 09:20:01 -0500 Subject: [PATCH] Fixes Signed-off-by: rapterjet2004 --- app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt | 1 + .../java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 0236e0e29c..3e19d4cdd7 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -506,6 +506,7 @@ class ChatActivity : .toString() + " | isPLaying: " + currentlyPlayedVoiceMessage!!.isPlayingVoiceMessage ) } + chatViewModel.handleOrientationChange() super.onSaveInstanceState(outState) } diff --git a/app/src/main/java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt b/app/src/main/java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt index 12c55b37ec..58eaa463a0 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt @@ -615,6 +615,10 @@ class ChatViewModel @Inject constructor( audioFocusRequestManager.audioFocusRequest(request, callback) } + fun handleOrientationChange() { + _getCapabilitiesViewState.value = GetCapabilitiesStartState + } + inner class GetRoomObserver : Observer { override fun onSubscribe(d: Disposable) { // unused atm