mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Merge develop into 4734_room_stack
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
@import MobileCoreServices;
|
||||
|
||||
#import "RoomViewController.h"
|
||||
|
||||
#import "RoomDataSource.h"
|
||||
@@ -106,6 +108,7 @@
|
||||
#import "AvatarGenerator.h"
|
||||
#import "Tools.h"
|
||||
#import "WidgetManager.h"
|
||||
#import "ShareManager.h"
|
||||
|
||||
#import "GBDeviceInfo_iOS.h"
|
||||
|
||||
@@ -249,6 +252,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
@property (nonatomic, strong) VoiceMessageController *voiceMessageController;
|
||||
@property (nonatomic, strong) SpaceDetailPresenter *spaceDetailPresenter;
|
||||
|
||||
@property (nonatomic, strong) ShareManager *shareManager;
|
||||
|
||||
@property (nonatomic, strong) UserSuggestionCoordinatorBridge *userSuggestionCoordinator;
|
||||
@property (nonatomic, weak) IBOutlet UIView *userSuggestionContainerView;
|
||||
|
||||
@@ -2399,10 +2404,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
|
||||
// Set a default title view class without handling tap gesture (Let [self refreshRoomTitle] refresh this view correctly).
|
||||
[self setRoomTitleViewClass:RoomTitleView.class];
|
||||
|
||||
// Remove details icon
|
||||
RoomTitleView *roomTitleView = (RoomTitleView*)self.titleView;
|
||||
|
||||
|
||||
// Remove the shadow image used to hide the bottom border of the navigation bar when the preview header is displayed
|
||||
[mainNavigationController.navigationBar setShadowImage:nil];
|
||||
[mainNavigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
|
||||
@@ -3195,6 +3197,23 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
}]];
|
||||
}
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
self.shareManager = [[ShareManager alloc] initWithShareItemProvider:[[SimpleShareItemProvider alloc] initWithTextMessage:selectedComponent.textMessage]
|
||||
type:ShareManagerTypeForward];
|
||||
|
||||
MXWeakify(self);
|
||||
[self.shareManager setCompletionCallback:^(ShareManagerResult result) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
[attachment onShareEnded];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
self.shareManager = nil;
|
||||
}];
|
||||
|
||||
[self presentViewController:self.shareManager.mainViewController animated:YES completion:nil];
|
||||
}]];
|
||||
|
||||
if (!isJitsiCallEvent)
|
||||
{
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote]
|
||||
@@ -3248,6 +3267,29 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
}
|
||||
else // Add action for attachment
|
||||
{
|
||||
if (attachment.type == MXKAttachmentTypeFile ||
|
||||
attachment.type == MXKAttachmentTypeImage ||
|
||||
attachment.type == MXKAttachmentTypeVideo ||
|
||||
attachment.type == MXKAttachmentTypeVoiceMessage) {
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
self.shareManager = [[ShareManager alloc] initWithShareItemProvider:[[SimpleShareItemProvider alloc] initWithAttachment:attachment]
|
||||
type:ShareManagerTypeForward];
|
||||
|
||||
MXWeakify(self);
|
||||
[self.shareManager setCompletionCallback:^(ShareManagerResult result) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
[attachment onShareEnded];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
self.shareManager = nil;
|
||||
}];
|
||||
|
||||
[self presentViewController:self.shareManager.mainViewController animated:YES completion:nil];
|
||||
}]];
|
||||
}
|
||||
|
||||
if (BuildSettings.messageDetailsAllowSave)
|
||||
{
|
||||
if (attachment.type == MXKAttachmentTypeImage || attachment.type == MXKAttachmentTypeVideo)
|
||||
@@ -3345,7 +3387,10 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
|
||||
[self cancelEventSelection];
|
||||
|
||||
[self startActivityIndicator];
|
||||
|
||||
[attachment prepareShare:^(NSURL *fileURL) {
|
||||
[self stopActivityIndicator];
|
||||
|
||||
__strong __typeof(weakSelf)self = weakSelf;
|
||||
self->documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
|
||||
@@ -3360,10 +3405,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
}
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
//Alert user
|
||||
[self showError:error];
|
||||
|
||||
[self stopActivityIndicator];
|
||||
}];
|
||||
|
||||
// Start animation in case of download during attachment preparing
|
||||
@@ -5075,14 +5118,14 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
|
||||
-(BOOL)checkUnsentMessages
|
||||
{
|
||||
RoomSentStatus sentStatus = RoomSentStatusOk;
|
||||
MXRoomSummarySentStatus sentStatus = MXRoomSummarySentStatusOk;
|
||||
if ([self.activitiesView isKindOfClass:RoomActivitiesView.class])
|
||||
{
|
||||
sentStatus = self.roomDataSource.room.sentStatus;
|
||||
sentStatus = self.roomDataSource.room.summary.sentStatus;
|
||||
|
||||
if (sentStatus != RoomSentStatusOk)
|
||||
if (sentStatus != MXRoomSummarySentStatusOk)
|
||||
{
|
||||
NSString *notification = sentStatus == RoomSentStatusSentFailedDueToUnknownDevices ?
|
||||
NSString *notification = sentStatus == MXRoomSummarySentStatusSentFailedDueToUnknownDevices ?
|
||||
[VectorL10n roomUnsentMessagesUnknownDevicesNotification] :
|
||||
[VectorL10n roomUnsentMessagesNotification];
|
||||
|
||||
@@ -5153,7 +5196,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
}
|
||||
}
|
||||
|
||||
return sentStatus != RoomSentStatusOk;
|
||||
return sentStatus != MXRoomSummarySentStatusOk;
|
||||
}
|
||||
|
||||
- (void)eventDidChangeSentState:(NSNotification *)notif
|
||||
|
||||
Reference in New Issue
Block a user