Przeglądaj źródła

control center page

Marino Faggiana 8 lat temu
rodzic
commit
de474d6973

+ 4 - 0
iOSClient/AppDelegate.h

@@ -33,6 +33,8 @@
 #import "CCBKPasscode.h"
 #import "CCUtility.h"
 #import "CCControlCenter.h"
+#import "CCControlCenterTransfer.h"
+#import "CCControlCenterActivity.h"
 #import "CCDetail.h"
 #import "CCQuickActions.h"
 #import "CCMain.h"
@@ -114,6 +116,8 @@
 
 // List Transfert
 @property (nonatomic, retain) CCControlCenter *controlCenter;
+@property (nonatomic, retain) CCControlCenterTransfer *controlCenterTransfer;
+@property (nonatomic, retain) CCControlCenterActivity *controlCenterActivity;
 
 // List Change Task
 @property (nonatomic, retain) NSMutableDictionary *listChangeTask;

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -187,7 +187,7 @@
     [self setTitle];
         
     // List Transfers
-    app.controlCenter = (CCControlCenter *)self.navigationController;
+    //app.controlCenter = (CCControlCenter *)self.navigationController;
     
     // Search
     self.definesPresentationContext = YES;
@@ -4698,14 +4698,14 @@
     if ([serverUrl isEqualToString:_serverUrl] == NO || _serverUrl == nil) {
         
         if ([selector isEqualToString:selectorDownloadSynchronize]) {
-//            [app.controlCenter reloadDatasource];
+            [app.controlCenterTransfer reloadDatasource];
         } else {
             CCMain *main = [app.listMainVC objectForKey:serverUrl];
             if (main) {
                 [main reloadDatasource];
             } else {
                 [self tableViewReload];
-//                [app.controlCenter reloadDatasource];
+                [app.controlCenterTransfer reloadDatasource];
             }
         }
         
@@ -4715,7 +4715,7 @@
     // Offline folder ?
     _isOfflineServerUrl = [CCCoreData isOfflineDirectoryServerUrl:_serverUrl activeAccount:app.activeAccount];
     
- //   [app.controlCenter reloadDatasource];
+    [app.controlCenterTransfer reloadDatasource];
     
     // Settaggio variabili per le ottimizzazioni
     _directoryGroupBy = [CCUtility getGroupBySettings];

+ 14 - 0
iOSClient/MenuAccount+ControlCenter/CCControlCenterActivity.m

@@ -8,10 +8,24 @@
 
 #import "CCControlCenterActivity.h"
 
+#import "AppDelegate.h"
 #import "CCControlCenterTransferCell.h"
 
 @implementation CCControlCenterActivity
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Init =====
+#pragma --------------------------------------------------------------------------------------------
+
+-  (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])  {
+        
+        app.controlCenterActivity = self;
+    }
+    return self;
+}
+
 - (void)viewDidLoad {
     
     [super viewDidLoad];

+ 13 - 0
iOSClient/MenuAccount+ControlCenter/CCControlCenterTransfer.m

@@ -29,6 +29,19 @@
 
 @implementation CCControlCenterTransfer
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Init =====
+#pragma --------------------------------------------------------------------------------------------
+
+-  (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])  {
+        
+        app.controlCenterTransfer = self;
+    }
+    return self;
+}
+
 - (void)viewDidLoad {
     
     [super viewDidLoad];

+ 2 - 2
iOSClient/Networking/CCNetworking.m

@@ -595,7 +595,7 @@
  
 #ifndef EXTENSION
             // Control Center
- //           [app.controlCenter progressTask:_currentProgressMetadata.fileID serverUrl:serverUrl cryptated:_currentProgressMetadata.cryptated progress:progress];
+           [app.controlCenterTransfer progressTask:_currentProgressMetadata.fileID serverUrl:serverUrl cryptated:_currentProgressMetadata.cryptated progress:progress];
         
             // Detail
             if (app.activeDetail)
@@ -1274,7 +1274,7 @@
             
 #ifndef EXTENSION
             // Control Center
-     //       [app.controlCenter progressTask:_currentProgressMetadata.fileID serverUrl:serverUrl cryptated:_currentProgressMetadata.cryptated progress:progress];
+            [app.controlCenterTransfer progressTask:_currentProgressMetadata.fileID serverUrl:serverUrl cryptated:_currentProgressMetadata.cryptated progress:progress];
 #endif
             
             if ([self.delegate respondsToSelector:@selector(progressTask:serverUrl:cryptated:progress:)])