Browse Source

clear code

marinofaggiana 4 years ago
parent
commit
abe2084ef4

+ 5 - 5
iOSClient/CCGlobal.h

@@ -328,7 +328,7 @@
 #define k_notificationCenter_clearDateReadDataSource    @"clearDateReadDataSource"
 #define k_notificationCenter_changeTheming              @"changeTheming"
 #define k_notificationCenter_splitViewChangeDisplayMode @"splitViewChangeDisplayMode"
-#define k_notificationCenter_synchronizationMedia       @"synchronizationMedia"
+#define k_notificationCenter_synchronizationMedia       @"synchronizationMedia"             // userInfo: metadata, type
 #define k_notificationCenter_changeUserProfile          @"changeUserProfile"
 #define k_notificationCenter_richdocumentGrabFocus      @"richdocumentGrabFocus"
 #define k_notificationCenter_reloadDataNCShare          @"reloadDataNCShare"
@@ -338,17 +338,17 @@
 #define k_notificationCenter_uploadedFile               @"uploadedFile"                     // userInfo: metadata, errorCode, errorDescription
 #define k_notificationCenter_downloadFileStart          @"downloadFileStart"                // userInfo: ocId, task, serverUrl, account
 #define k_notificationCenter_downloadedFile             @"downloadedFile"                   // userInfo: metadata, selector, errorCode, errorDescription
-#define k_notificationCenter_progressTask               @"progressTask"
-
+#define k_notificationCenter_progressTask               @"progressTask"                     // userInfo: account, ocId, serverUrl, status, progress, totalBytes, totalBytesExpected
 #define k_notificationCenter_createFolder               @"createFolder"                     // userInfo: fileName, serverUrl, errorCode, errorDescription
 #define k_notificationCenter_deleteFile                 @"deleteFile"                       // userInfo: metadata, errorCode, errorDescription
 #define k_notificationCenter_renameFile                 @"renameFile"                       // userInfo: metadata, errorCode, errorDescription
 #define k_notificationCenter_moveFile                   @"moveFile"                         // userInfo: metadata, metadataNew, errorCode, errorDescription
 #define k_notificationCenter_copyFile                   @"copyFile"                         // userInfo: metadata, serverUrlTo, errorCode, errorDescription
 #define k_notificationCenter_favoriteFile               @"favoriteFile"                     // userInfo: metadata, favorite, errorCode, errorDescription
+
 #define k_notificationCenter_menuSearchTextPDF          @"menuSearchTextPDF"
-#define k_notificationCenter_menuDownloadImage          @"menuDownloadImage"
-#define k_notificationCenter_menuSaveLivePhoto          @"menuSaveLivePhoto"
+#define k_notificationCenter_menuDownloadImage          @"menuDownloadImage"                // userInfo: metadata
+#define k_notificationCenter_menuSaveLivePhoto          @"menuSaveLivePhoto"                // UserInfo: metadata, metadataMov
 #define k_notificationCenter_menuDetailClose            @"menuDetailClose"
 
 

+ 2 - 4
iOSClient/Main/Menu/NCDetailNavigationController+Menu.swift

@@ -169,8 +169,7 @@ extension NCDetailNavigationController {
                     NCMenuAction(title: NSLocalizedString("_search_", comment: ""),
                         icon: CCGraphics.changeThemingColorImage(UIImage(named: "search"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
                         action: { menuAction in
-                             NotificationCenter.default.post(name: Notification.Name.init(rawValue:
-                                               k_notificationCenter_menuSearchTextPDF), object: nil)
+                             NotificationCenter.default.post(name: Notification.Name.init(rawValue:k_notificationCenter_menuSearchTextPDF), object: nil)
                         }
                     )
                 )
@@ -197,8 +196,7 @@ extension NCDetailNavigationController {
                         NCMenuAction(title: NSLocalizedString("_livephoto_save_", comment: ""),
                             icon: CCGraphics.changeThemingColorImage(UIImage(named: "livePhoto"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
                             action: { menuAction in
-                                let userInfo: [String : Any] = ["metadata": metadata, "metadataMov": metadataLive]
-                                NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_menuSaveLivePhoto), object: nil, userInfo: userInfo)
+                                NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_menuSaveLivePhoto), object: nil, userInfo: ["metadata": metadata, "metadataMov": metadataLive])
                             }
                         )
                     )