浏览代码

disable quickaction: shortcutUpload

Marino Faggiana 6 年之前
父节点
当前提交
202d062b8e
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      iOSClient/AppDelegate.m
  2. 1 1
      iOSClient/QuickActions/CCQuickActions.m

+ 3 - 3
iOSClient/AppDelegate.m

@@ -290,7 +290,7 @@
 {
     NSLog(@"[LOG] Enter in Background");
 
-    [[CCQuickActions quickActionsManager] closeAll];
+    //[[CCQuickActions quickActionsManager] closeAll];
     
     [[BKPasscodeLockScreenManager sharedManager] showLockScreen:YES];
     
@@ -538,8 +538,8 @@
     UIApplicationShortcutItem *shortcutUpload = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.upload", bundleId] localizedTitle:NSLocalizedString(@"_upload_file_", nil) localizedSubtitle:nil icon:shortcutUploadIcon userInfo:nil];
    
     // add the array to our app
-    if (shortcutUpload && shortcutMedia)
-        [UIApplication sharedApplication].shortcutItems = @[shortcutUpload, shortcutMedia];
+    if (shortcutMedia)
+        [UIApplication sharedApplication].shortcutItems = @[shortcutMedia];
 }
 
 - (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler

+ 1 - 1
iOSClient/QuickActions/CCQuickActions.m

@@ -83,7 +83,7 @@
 
 - (void)openAssetsPickerController
 {
-    [[NCMainCommon sharedInstance] openPhotosPickerViewController:self phAssets:^(NSArray<PHAsset *> * _Nonnull assets) {
+    [[NCMainCommon sharedInstance] openPhotosPickerViewController:_mainVC phAssets:^(NSArray<PHAsset *> * _Nonnull assets) {
         if (assets.count > 0) {
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
                 _assets = [[NSMutableArray alloc] initWithArray:assets];