#4090 - Add voice message controller, audio recorder and toolbar view links. Working audio file sending and cancellation.

This commit is contained in:
Stefan Ceriu
2021-06-07 10:20:26 +03:00
committed by Stefan Ceriu
parent 426fe04af7
commit 0dd247d53e
9 changed files with 273 additions and 19 deletions

View File

@@ -41,8 +41,6 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
UIAlertController *actionSheet;
}
@property (nonatomic, strong) VoiceMessageToolbarView *voiceMessageToolbarView;
@end
@implementation RoomInputToolbarView
@@ -78,16 +76,19 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
self.isEncryptionEnabled = _isEncryptionEnabled;
self.voiceMessageToolbarView = [VoiceMessageToolbarView instanceFromNib];
[self _updateUIWithTextMessage:nil animated:NO];
}
- (void)setVoiceMessageToolbarView:(UIView *)voiceMessageToolbarView
{
_voiceMessageToolbarView = voiceMessageToolbarView;
self.voiceMessageToolbarView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:self.voiceMessageToolbarView];
[NSLayoutConstraint activateConstraints:@[[self.mainToolbarView.topAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.topAnchor],
[self.mainToolbarView.leftAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.leftAnchor],
[self.mainToolbarView.bottomAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.bottomAnchor],
[self.mainToolbarView.rightAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.rightAnchor]]];
[self _updateUIWithTextMessage:nil animated:NO];
}
#pragma mark - Override MXKView
@@ -140,8 +141,6 @@ const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
self.inputContextLabel.textColor = ThemeService.shared.theme.textSecondaryColor;
self.inputContextButton.tintColor = ThemeService.shared.theme.textSecondaryColor;
[self.actionsBar updateWithTheme:ThemeService.shared.theme];
[self.voiceMessageToolbarView updateWithTheme:ThemeService.shared.theme];
}
#pragma mark -