mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Merge commit 'aaadcc73674cc8886e363693a7d7c08ac9b4f516' into feature/4260_merge_foss_1_10_2
# Conflicts: # Config/AppVersion.xcconfig # Podfile # Podfile.lock # Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved # Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift # Riot/Modules/Application/LegacyAppDelegate.m # Riot/Modules/Authentication/AuthenticationCoordinator.swift # Riot/Modules/Authentication/Legacy/LegacyAuthenticationCoordinator.swift # Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift # Riot/Modules/Home/AllChats/AllChatsViewController.swift # Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift # Riot/Modules/Room/Settings/RoomSettingsViewController.m # fastlane/Fastfile
This commit is contained in:
@@ -2477,13 +2477,19 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
// Prevents listening a VB when recording a new one
|
||||
[VoiceBroadcastPlaybackProvider.shared pausePlaying];
|
||||
|
||||
// Check connectivity
|
||||
if ([AppDelegate theDelegate].isOffline)
|
||||
{
|
||||
[self showAlertWithTitle:[VectorL10n voiceBroadcastConnectionErrorTitle] message:[VectorL10n voiceBroadcastConnectionErrorMessage]];
|
||||
return;
|
||||
}
|
||||
|
||||
// Request the voice broadcast service to start recording - No service is returned if someone else is already broadcasting in the room
|
||||
[session getOrCreateVoiceBroadcastServiceFor:self.roomDataSource.room completion:^(VoiceBroadcastService *voiceBroadcastService) {
|
||||
if (voiceBroadcastService) {
|
||||
[voiceBroadcastService startVoiceBroadcastWithSuccess:^(NSString * _Nullable success) {
|
||||
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
[voiceBroadcastService startVoiceBroadcastWithSuccess:^(NSString * _Nullable success) { } failure:^(NSError * _Nonnull error) {
|
||||
[self showAlertWithTitle:[VectorL10n voiceBroadcastConnectionErrorTitle] message:[VectorL10n voiceBroadcastConnectionErrorMessage]];
|
||||
[session tearDownVoiceBroadcastService];
|
||||
}];
|
||||
}
|
||||
else
|
||||
@@ -4330,8 +4336,14 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
[self startActivityIndicator];
|
||||
|
||||
NSArray<NSString *>* relationTypes = nil;
|
||||
// If it's a voice broadcast, delete the selected event and all related events.
|
||||
if (selectedEvent.eventType == MXEventTypeCustom && [selectedEvent.type isEqualToString:VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]) {
|
||||
relationTypes = @[MXEventRelationTypeReference];
|
||||
}
|
||||
|
||||
MXWeakify(self);
|
||||
[self.roomDataSource.room redactEvent:selectedEvent.eventId reason:nil success:^{
|
||||
[self.roomDataSource.room redactEvent:selectedEvent.eventId withRelations:relationTypes reason:nil success:^{
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
[self stopActivityIndicator];
|
||||
} failure:^(NSError *error) {
|
||||
@@ -5221,7 +5233,14 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
- (IBAction)onVoiceCallPressed:(id)sender
|
||||
{
|
||||
if (self.isCallActive)
|
||||
// Manage case of a Voice broadcast listening -> Pause Voice broadcast playback
|
||||
[VoiceBroadcastPlaybackProvider.shared pausePlaying];
|
||||
|
||||
if (VoiceBroadcastRecorderProvider.shared.isVoiceBroadcastRecording) {
|
||||
[[AppDelegate theDelegate] showAlertWithTitle:VectorL10n.voiceBroadcastVoipCannotStartTitle
|
||||
message:VectorL10n.voiceBroadcastVoipCannotStartDescription];
|
||||
}
|
||||
else if (self.isCallActive)
|
||||
{
|
||||
[self hangupCall];
|
||||
}
|
||||
@@ -5233,7 +5252,15 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
- (IBAction)onVideoCallPressed:(id)sender
|
||||
{
|
||||
[self placeCallWithVideo:YES];
|
||||
// Manage case of a Voice broadcast listening -> Pause Voice broadcast playback
|
||||
[VoiceBroadcastPlaybackProvider.shared pausePlaying];
|
||||
|
||||
if (VoiceBroadcastRecorderProvider.shared.isVoiceBroadcastRecording) {
|
||||
[[AppDelegate theDelegate] showAlertWithTitle:VectorL10n.voiceBroadcastVoipCannotStartTitle
|
||||
message:VectorL10n.voiceBroadcastVoipCannotStartDescription];
|
||||
} else {
|
||||
[self placeCallWithVideo:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onThreadListTapped:(id)sender
|
||||
@@ -5264,25 +5291,9 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
{
|
||||
// Dismiss potential keyboard.
|
||||
[self dismissKeyboard];
|
||||
|
||||
// Jump to the last unread event by using a temporary room data source initialized with the last unread event id.
|
||||
MXWeakify(self);
|
||||
[RoomDataSource loadRoomDataSourceWithRoomId:self.roomDataSource.roomId
|
||||
initialEventId:self.roomDataSource.room.accountData.readMarkerEventId
|
||||
threadId:self.roomDataSource.threadId
|
||||
andMatrixSession:self.mainSession
|
||||
onComplete:^(id roomDataSource) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[roomDataSource finalizeInitialization];
|
||||
|
||||
// Center the bubbles table content on the bottom of the read marker event in order to display correctly the read marker view.
|
||||
self.centerBubblesTableViewContentOnTheInitialEventBottom = YES;
|
||||
[self displayRoom:roomDataSource];
|
||||
|
||||
// Give the data source ownership to the room view controller.
|
||||
self.hasRoomDataSourceOwnership = YES;
|
||||
}];
|
||||
NSString *eventId = self.roomDataSource.room.accountData.readMarkerEventId;
|
||||
NSString *threadId = self.roomDataSource.threadId;
|
||||
[self reloadRoomWihtEventId:eventId threadId:threadId];
|
||||
}
|
||||
else if (sender == self.resetReadMarkerButton)
|
||||
{
|
||||
@@ -7905,6 +7916,35 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
[[AppDelegate theDelegate] showRoomWithParameters:parameters];
|
||||
}
|
||||
}
|
||||
- (void)roomInfoCoordinatorBridgePresenter:(RoomInfoCoordinatorBridgePresenter *)coordinator
|
||||
viewEventInTimeline:(MXEvent *)event
|
||||
{
|
||||
[self.navigationController popToViewController:self animated:true];
|
||||
[self reloadRoomWihtEventId:event.eventId threadId:event.threadId];
|
||||
}
|
||||
|
||||
-(void)reloadRoomWihtEventId:(NSString *)eventId
|
||||
threadId:(NSString *)threadId
|
||||
{
|
||||
// Jump to the last unread event by using a temporary room data source initialized with the last unread event id.
|
||||
MXWeakify(self);
|
||||
[RoomDataSource loadRoomDataSourceWithRoomId:self.roomDataSource.roomId
|
||||
initialEventId:eventId
|
||||
threadId:threadId
|
||||
andMatrixSession:self.mainSession
|
||||
onComplete:^(id roomDataSource) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[roomDataSource finalizeInitialization];
|
||||
|
||||
// Center the bubbles table content on the bottom of the read marker event in order to display correctly the read marker view.
|
||||
self.centerBubblesTableViewContentOnTheInitialEventBottom = YES;
|
||||
[self displayRoom:roomDataSource];
|
||||
|
||||
// Give the data source ownership to the room view controller.
|
||||
self.hasRoomDataSourceOwnership = YES;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - RemoveJitsiWidgetViewDelegate
|
||||
|
||||
@@ -7972,7 +8012,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
samples:(NSArray<NSNumber *> *)samples
|
||||
completion:(void (^)(BOOL))completion
|
||||
{
|
||||
[self.roomDataSource sendVoiceMessage:url mimeType:nil duration:duration samples:samples success:^(NSString *eventId) {
|
||||
[self.roomDataSource sendVoiceMessage:url additionalContentParams:nil mimeType:nil duration:duration samples:samples success:^(NSString *eventId) {
|
||||
MXLogDebug(@"Success with event id %@", eventId);
|
||||
completion(YES);
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
Reference in New Issue
Block a user