mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
stop mediaPlayer in onDestroy
a voice message now continues to play if app goes to background, but whenever the user returns he can pause or stop the playback (UI is updated). Also, the playback survives a screen orientation change. instead stopping the mediaPlayer in onDetach would stop playback when moving app to background but also stop the playback on a screen orientation change. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
6be66fdcff
commit
c7bb6402fe
@ -1436,8 +1436,6 @@ class ChatController(args: Bundle) :
|
||||
if (mentionAutocomplete != null && mentionAutocomplete!!.isPopupShowing) {
|
||||
mentionAutocomplete?.dismissPopup()
|
||||
}
|
||||
|
||||
currentlyPlayedVoiceMessage?.let { stopMediaPlayer(it) }
|
||||
}
|
||||
|
||||
override val title: String
|
||||
@ -1459,6 +1457,8 @@ class ChatController(args: Bundle) :
|
||||
actionBar?.setIcon(null)
|
||||
}
|
||||
|
||||
currentlyPlayedVoiceMessage?.let { stopMediaPlayer(it) }
|
||||
|
||||
adapter = null
|
||||
inConversation = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user