mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix audio recording dismiss label
This commit is contained in:
parent
cb89c3d9ef
commit
e055c689b8
@ -982,13 +982,15 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
|
||||
|
||||
let indicatorTranslation = max(0.0, self.actionButtons.micButton.cancelTranslation - cancelTransformThreshold)
|
||||
|
||||
audioRecordingCancelIndicator.frame = CGRect(
|
||||
let audioRecordingCancelIndicatorFrame = CGRect(
|
||||
origin: CGPoint(
|
||||
x: leftInset + floor((baseWidth - audioRecordingCancelIndicator.bounds.size.width - indicatorTranslation) / 2.0),
|
||||
y: panelHeight - minimalHeight + floor((minimalHeight - audioRecordingCancelIndicator.bounds.size.height) / 2.0)),
|
||||
size: audioRecordingCancelIndicator.bounds.size)
|
||||
audioRecordingCancelIndicator.frame = audioRecordingCancelIndicatorFrame
|
||||
if self.actionButtons.micButton.cancelTranslation > cancelTransformThreshold {
|
||||
let progress = 1 - (self.actionButtons.micButton.cancelTranslation - cancelTransformThreshold) / 80
|
||||
//let progress = 1 - (self.actionButtons.micButton.cancelTranslation - cancelTransformThreshold) / 80
|
||||
let progress: CGFloat = max(0.0, min(1.0, (audioRecordingCancelIndicatorFrame.minX - 100.0) / 10.0))
|
||||
audioRecordingCancelIndicator.alpha = progress
|
||||
} else {
|
||||
audioRecordingCancelIndicator.alpha = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user