#4090 - Fixed UI regression if BuildSettings.voiceMessagesEnabled = false

This commit is contained in:
Gil Eluard
2021-06-29 10:17:15 +02:00
parent 107a063bbe
commit 4c7542810a
3 changed files with 11 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ const CGFloat kActionMenuAttachButtonSpringVelocity = 7;
const CGFloat kActionMenuAttachButtonSpringDamping = .45;
const NSTimeInterval kActionMenuContentAlphaAnimationDuration = .2;
const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
const CGFloat kComposerContainerTrailingPadding = 12;
@interface RoomInputToolbarView()
{
@@ -439,6 +440,11 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
self.actionMenuOpened = NO;
if (BuildSettings.voiceMessagesEnabled == NO) {
self.rightInputToolbarButton.alpha = textMessage.length ? 1.0f : 0.0f;
self.messageComposerContainerTrailingConstraint.constant = (textMessage.length ? self.frame.size.width - self.rightInputToolbarButton.frame.origin.x : 0.0f) + kComposerContainerTrailingPadding;
[self layoutIfNeeded];
return;
}