mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix side button capture in chat camera
This commit is contained in:
@@ -16,15 +16,19 @@ private final class LegacyHandlerImpl: VolumeButtonHandlerImpl {
|
||||
context: SharedAccountContext,
|
||||
performAction: @escaping (VolumeButtonsListener.Action) -> Void
|
||||
) {
|
||||
self.handler = PGCameraVolumeButtonHandler(upButtonPressedBlock: {
|
||||
performAction(.up)
|
||||
}, upButtonReleasedBlock: {
|
||||
performAction(.upRelease)
|
||||
}, downButtonPressedBlock: {
|
||||
performAction(.down)
|
||||
}, downButtonReleasedBlock: {
|
||||
performAction(.downRelease)
|
||||
})
|
||||
self.handler = PGCameraVolumeButtonHandler(
|
||||
isCameraSpecific: false,
|
||||
eventView: context.mainWindow?.viewController?.view,
|
||||
upButtonPressedBlock: {
|
||||
performAction(.up)
|
||||
}, upButtonReleasedBlock: {
|
||||
performAction(.upRelease)
|
||||
}, downButtonPressedBlock: {
|
||||
performAction(.down)
|
||||
}, downButtonReleasedBlock: {
|
||||
performAction(.downRelease)
|
||||
}
|
||||
)
|
||||
self.handler.enabled = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user