Apply patch

This commit is contained in:
Ali
2020-06-16 21:42:07 +04:00
parent c79bbad083
commit a00cfa349d
6 changed files with 53 additions and 30 deletions

View File

@@ -237,6 +237,18 @@ final class ChatTextInputMediaRecordingButton: TGModernConversationInputMicButto
}
}
private lazy var micDecoration: (UIView & TGModernConversationInputMicButtonDecoration) = {
let blobView = VoiceBlobView(frame: CGRect(origin: CGPoint(), size: CGSize(width: 180.0, height: 180.0)))
blobView.setColor(self.theme.chat.inputPanel.actionControlFillColor)
return blobView
}()
private lazy var micLock: (UIView & TGModernConversationInputMicButtonLock) = {
let lockView = LockView(frame: CGRect(origin: CGPoint(), size: CGSize(width: 40.0, height: 60.0)), theme: self.theme, strings: self.strings)
lockView.addTarget(self, action: #selector(handleStopTap), for: .touchUpInside)
return lockView
}()
init(theme: PresentationTheme, strings: PresentationStrings, presentController: @escaping (ViewController) -> Void) {
self.theme = theme
self.strings = strings
@@ -317,6 +329,8 @@ final class ChatTextInputMediaRecordingButton: TGModernConversationInputMicButto
}
self.pallete = legacyInputMicPalette(from: theme)
self.micDecoration.setColor(self.theme.chat.inputPanel.actionControlFillColor)
(self.micLock as? LockView)?.updateTheme(theme)
}
deinit {
@@ -397,15 +411,11 @@ final class ChatTextInputMediaRecordingButton: TGModernConversationInputMicButto
}
func micButtonDecoration() -> (UIView & TGModernConversationInputMicButtonDecoration)! {
let blobView = VoiceBlobView(frame: CGRect(origin: CGPoint(), size: CGSize(width: 180.0, height: 180.0)))
blobView.setColor(self.theme.chat.inputPanel.actionControlFillColor)
return blobView
return micDecoration
}
func micButtonLock() -> (UIView & TGModernConversationInputMicButtonLock)! {
let lockView = LockView(frame: CGRect(origin: CGPoint(), size: CGSize(width: 40.0, height: 60.0)), theme: self.theme, strings: self.strings)
lockView.addTarget(self, action: #selector(handleStopTap), for: .touchUpInside)
return lockView
return micLock
}
@objc private func handleStopTap() {