mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Message bubbles: Improve voice message cells implementation.
This commit is contained in:
@@ -18,7 +18,7 @@ import Foundation
|
||||
|
||||
class VoiceMessageBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplayable {
|
||||
|
||||
private var playbackController: VoiceMessagePlaybackController!
|
||||
private(set) var playbackController: VoiceMessagePlaybackController!
|
||||
|
||||
override func render(_ cellData: MXKCellData!) {
|
||||
super.render(cellData)
|
||||
@@ -34,6 +34,8 @@ class VoiceMessageBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplaya
|
||||
if playbackController.attachment != data.attachment {
|
||||
playbackController.attachment = data.attachment
|
||||
}
|
||||
|
||||
self.update(theme: ThemeService.shared().theme)
|
||||
}
|
||||
|
||||
override func setupViews() {
|
||||
@@ -52,4 +54,15 @@ class VoiceMessageBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplaya
|
||||
|
||||
contentView.vc_addSubViewMatchingParent(playbackController.playbackView)
|
||||
}
|
||||
|
||||
override func update(theme: Theme) {
|
||||
|
||||
super.update(theme: theme)
|
||||
|
||||
guard let playbackController = playbackController else {
|
||||
return
|
||||
}
|
||||
|
||||
playbackController.playbackView.update(theme: theme)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user