Browse Source

clear code

Marino Faggiana 8 năm trước cách đây
mục cha
commit
c54aaae4db
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 3
      iOSClient/Activity/CCActivity.m
  2. 2 0
      iOSClient/CCGlobal.h

+ 1 - 3
iOSClient/Activity/CCActivity.m

@@ -35,8 +35,6 @@
 #define fontSizeAction  [UIFont systemFontOfSize:14]
 #define fontSizeNote    [UIFont systemFontOfSize:14]
 
-#define daysOfActivity  7
-
 @interface CCActivity ()
 {
     BOOL _verbose;
@@ -157,7 +155,7 @@
     
     NSPredicate *predicate;
         
-    NSDate *sixDaysAgo = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-daysOfActivity toDate:[NSDate date] options:0];
+    NSDate *sixDaysAgo = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-k_daysOfActivity toDate:[NSDate date] options:0];
         
     if (_verbose)
         predicate = [NSPredicate predicateWithFormat:@"((account == %@) || (account == '')) AND (date > %@)", app.activeAccount, sixDaysAgo];

+ 2 - 0
iOSClient/CCGlobal.h

@@ -57,6 +57,8 @@ extern NSString *const urlBaseUploadDB;
 
 #define k_dayForceReadFolder                            3
 
+#define k_daysOfActivity                                7
+
 #define k_returnCreateFolderPlain                       0
 #define k_returnCreateFotoVideoPlain                    1
 #define k_returnCreateFilePlain                         2