mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Fix 2x rate button flashing on track change
This commit is contained in:
parent
df058226d6
commit
466dfdcd5a
@ -349,14 +349,14 @@ final class OverlayPlayerControlsNode: ASDisplayNode {
|
||||
}
|
||||
|
||||
let duration = value.status.duration
|
||||
if duration != strongSelf.currentDuration {
|
||||
if duration != strongSelf.currentDuration && !duration.isZero {
|
||||
strongSelf.currentDuration = duration
|
||||
if let layout = strongSelf.validLayout {
|
||||
strongSelf.updateLayout(width: layout.0, leftInset: layout.1, rightInset: layout.2, maxHeight: layout.3, transition: .immediate)
|
||||
}
|
||||
}
|
||||
|
||||
strongSelf.rateButton.isHidden = rateButtonIsHidden || strongSelf.currentDuration.isZero
|
||||
strongSelf.rateButton.isHidden = rateButtonIsHidden
|
||||
} else {
|
||||
strongSelf.playPauseButton.isEnabled = false
|
||||
strongSelf.backwardButton.isEnabled = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user