#4656 - Stop recording voice message and go into locked mode when the application becomes inactive. Updated changes.rst.

This commit is contained in:
Stefan Ceriu
2021-08-04 16:55:57 +03:00
committed by Stefan Ceriu
parent 8e73c7546e
commit f259a479d2
2 changed files with 8 additions and 0 deletions
@@ -88,6 +88,8 @@ public class VoiceMessageController: NSObject, VoiceMessageToolbarViewDelegate,
NotificationCenter.default.addObserver(self, selector: #selector(updateTheme), name: .themeServiceDidChangeTheme, object: nil)
updateTheme()
NotificationCenter.default.addObserver(self, selector: #selector(applicationWillResignActive), name: UIApplication.willResignActiveNotification, object: nil)
updateUI()
}
@@ -312,6 +314,10 @@ public class VoiceMessageController: NSObject, VoiceMessageToolbarViewDelegate,
_voiceMessageToolbarView.update(theme: themeService.theme)
}
@objc private func applicationWillResignActive() {
finishRecording()
}
@objc private func handleDisplayLinkTick() {
updateUI()
}