mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Introduced new ShareExtensionDelegate method didStartSendingToRoom to notify the viewController when the request is initiated to only then show the loading hud, block interaction with the view, etc
This commit is contained in:
@@ -109,9 +109,7 @@
|
||||
UIAlertAction *sendAction = [UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"send"] style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
MXRoom *selectedRoom = [self.dataSource getRoomAtIndexPath:indexPath];
|
||||
|
||||
self.hudView = [MXKPieChartHUD showLoadingHudOnView:self.view WithMessage:NSLocalizedStringFromTable(@"sending", @"Vector", nil)];
|
||||
[ShareExtensionManager sharedManager].delegate = self;
|
||||
self.parentViewController.view.userInteractionEnabled = NO;
|
||||
|
||||
[[ShareExtensionManager sharedManager] sendContentToRoom:selectedRoom failureBlock:^{
|
||||
[self showFailureAlert];
|
||||
@@ -211,6 +209,13 @@
|
||||
[self presentViewController:compressionPrompt animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)shareExtensionManager:(ShareExtensionManager *)extensionManager didStartSendingContentToRoom:(MXRoom *)room
|
||||
{
|
||||
self.parentViewController.view.userInteractionEnabled = NO;
|
||||
self.hudView = [MXKPieChartHUD showLoadingHudOnView:self.view WithMessage:NSLocalizedStringFromTable(@"sending", @"Vector", nil)];
|
||||
[self.hudView setProgress:0.0];
|
||||
}
|
||||
|
||||
- (void)shareExtensionManager:(ShareExtensionManager *)extensionManager mediaUploadProgress:(CGFloat)progress
|
||||
{
|
||||
[self.hudView setProgress:progress];
|
||||
|
||||
Reference in New Issue
Block a user