mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various improvements
This commit is contained in:
@@ -687,41 +687,41 @@ open class TelegramBaseController: ViewController, KeyShortcutResponder {
|
||||
}
|
||||
strongSelf.context.sharedContext.mediaManager.playlistControl(.setBaseRate(baseRate), type: type)
|
||||
|
||||
var hasTooltip = false
|
||||
strongSelf.forEachController({ controller in
|
||||
if let controller = controller as? UndoOverlayController {
|
||||
hasTooltip = true
|
||||
controller.dismissWithCommitAction()
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||
let slowdown: Bool?
|
||||
if baseRate == .x1 {
|
||||
slowdown = true
|
||||
} else if baseRate == .x2 {
|
||||
slowdown = false
|
||||
} else {
|
||||
slowdown = nil
|
||||
}
|
||||
if let slowdown = slowdown {
|
||||
strongSelf.present(
|
||||
UndoOverlayController(
|
||||
presentationData: presentationData,
|
||||
content: .audioRate(
|
||||
slowdown: slowdown,
|
||||
text: slowdown ? presentationData.strings.Conversation_AudioRateTooltipNormal : presentationData.strings.Conversation_AudioRateTooltipSpeedUp
|
||||
),
|
||||
elevatedLayout: false,
|
||||
animateInAsReplacement: hasTooltip,
|
||||
action: { action in
|
||||
return true
|
||||
}
|
||||
),
|
||||
in: .current
|
||||
)
|
||||
}
|
||||
// var hasTooltip = false
|
||||
// strongSelf.forEachController({ controller in
|
||||
// if let controller = controller as? UndoOverlayController {
|
||||
// hasTooltip = true
|
||||
// controller.dismissWithCommitAction()
|
||||
// }
|
||||
// return true
|
||||
// })
|
||||
//
|
||||
// let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||
// let slowdown: Bool?
|
||||
// if baseRate == .x1 {
|
||||
// slowdown = true
|
||||
// } else if baseRate == .x2 {
|
||||
// slowdown = false
|
||||
// } else {
|
||||
// slowdown = nil
|
||||
// }
|
||||
// if let slowdown = slowdown {
|
||||
// strongSelf.present(
|
||||
// UndoOverlayController(
|
||||
// presentationData: presentationData,
|
||||
// content: .audioRate(
|
||||
// slowdown: slowdown,
|
||||
// text: slowdown ? presentationData.strings.Conversation_AudioRateTooltipNormal : presentationData.strings.Conversation_AudioRateTooltipSpeedUp
|
||||
// ),
|
||||
// elevatedLayout: false,
|
||||
// animateInAsReplacement: hasTooltip,
|
||||
// action: { action in
|
||||
// return true
|
||||
// }
|
||||
// ),
|
||||
// in: .current
|
||||
// )
|
||||
// }
|
||||
})
|
||||
}
|
||||
mediaAccessoryPanel.togglePlayPause = { [weak self] in
|
||||
|
||||
Reference in New Issue
Block a user