mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 00:48:26 +00:00
Feedback
This commit is contained in:
parent
e49d017b08
commit
03893973b7
@ -107,7 +107,7 @@ class ConversationViewModel(
|
|||||||
override fun onCleared() {
|
override fun onCleared() {
|
||||||
super.onCleared()
|
super.onCleared()
|
||||||
|
|
||||||
// Stop all voice message when existing the convo page
|
// Stop all voice message when exiting the convo page
|
||||||
AudioSlidePlayer.stopAll()
|
AudioSlidePlayer.stopAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,13 +159,9 @@ class ConversationViewModel(
|
|||||||
* Stops audio player if its current playing is the one given in the message.
|
* Stops audio player if its current playing is the one given in the message.
|
||||||
*/
|
*/
|
||||||
private fun stopPlayingAudioMessage(message: MessageRecord) {
|
private fun stopPlayingAudioMessage(message: MessageRecord) {
|
||||||
val player = AudioSlidePlayer.getInstance()
|
val mmsMessage = message as? MmsMessageRecord ?: return
|
||||||
val audioSlide = player?.audioSlide
|
val audioSlide = mmsMessage.slideDeck.audioSlide ?: return
|
||||||
if (audioSlide != null &&
|
AudioSlidePlayer.getInstance()?.takeIf { it.audioSlide == audioSlide }?.stop()
|
||||||
message is MmsMessageRecord &&
|
|
||||||
message.slideDeck.audioSlide == audioSlide) {
|
|
||||||
player.stop()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setRecipientApproved() {
|
fun setRecipientApproved() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user