mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Stop audio on redaction (#1893)
This commit is contained in:
parent
7f09c02298
commit
20143cb84e
@ -379,7 +379,16 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
if timelineItem is EncryptedHistoryRoomTimelineItem {
|
if timelineItem is EncryptedHistoryRoomTimelineItem {
|
||||||
lastEncryptedHistoryItemIndex = newTimelineItems.endIndex
|
lastEncryptedHistoryItemIndex = newTimelineItems.endIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stops the audio player when a voice message is redacted.
|
||||||
|
if timelineItem is RedactedRoomTimelineItem {
|
||||||
|
guard let audioState = timelineAudioPlayerStates[timelineItem.id] else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
audioState.detachAudioPlayer()
|
||||||
|
timelineAudioPlayerStates.removeValue(forKey: timelineItem.id)
|
||||||
|
}
|
||||||
|
|
||||||
newTimelineItems.append(timelineItem)
|
newTimelineItems.append(timelineItem)
|
||||||
} else {
|
} else {
|
||||||
newTimelineItems.append(CollapsibleTimelineItem(items: items))
|
newTimelineItems.append(CollapsibleTimelineItem(items: items))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user