#4090 - Added voice messages feature flag.

This commit is contained in:
Stefan Ceriu
2021-06-15 09:53:09 +03:00
parent 58edea8ac5
commit 06eae5564a
2 changed files with 12 additions and 0 deletions

View File

@@ -81,6 +81,10 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
- (void)setVoiceMessageToolbarView:(UIView *)voiceMessageToolbarView
{
if (BuildSettings.voiceMessagesEnabled == NO) {
return;
}
_voiceMessageToolbarView = voiceMessageToolbarView;
self.voiceMessageToolbarView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:self.voiceMessageToolbarView];
@@ -434,6 +438,10 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
{
self.actionMenuOpened = NO;
if (BuildSettings.voiceMessagesEnabled == NO) {
return;
}
[UIView animateWithDuration:(animated ? 0.15f : 0.0f) animations:^{
self.rightInputToolbarButton.alpha = textMessage.length ? 1.0f : 0.0f;
self.voiceMessageToolbarView.alpha = textMessage.length ? 0.0f : 1.0;