瀏覽代碼

Activity View

Marino Faggiana 8 年之前
父節點
當前提交
d2717f55ba
共有 1 個文件被更改,包括 14 次插入7 次删除
  1. 14 7
      iOSClient/MenuAccount+ControlCenter/CCControlCenterActivity.m

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

@@ -81,8 +81,11 @@
         
         
          //_sectionDataSource = [CCCoreData getAllTableActivityWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (idActivity != 0)", app.activeAccount]];
          //_sectionDataSource = [CCCoreData getAllTableActivityWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (idActivity != 0)", app.activeAccount]];
         
         
-        _sectionDataSource = [CCCoreData getAllTableActivityWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", app.activeAccount]];
-                
+        if ([CCUtility getActivityVerboseDebug])
+            _sectionDataSource = [CCCoreData getAllTableActivityWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", app.activeAccount]];
+        else
+            _sectionDataSource = [CCCoreData getAllTableActivityWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (verbose == %lu)", app.activeAccount, k_activityVerboseDefault]];
+        
         if ([[app.controlCenter getActivePage] isEqualToString:k_pageControlCenterActivity]) {
         if ([[app.controlCenter getActivePage] isEqualToString:k_pageControlCenterActivity]) {
             
             
             if ([_sectionDataSource count] == 0) {
             if ([_sectionDataSource count] == 0) {
@@ -134,10 +137,10 @@
     noteLabel.lineBreakMode = NSLineBreakByWordWrapping;
     noteLabel.lineBreakMode = NSLineBreakByWordWrapping;
     int heighNoteLabel = [self getLabelHeight:noteLabel];
     int heighNoteLabel = [self getLabelHeight:noteLabel];
 
 
-    int heightView = 80 + heighNoteLabel + (heighNoteLabel/5);
+    int heightView = 90 + heighNoteLabel + (heighNoteLabel/5);
     
     
-    if (heightView < 80)
-        heightView = 80;
+    if (heightView < 90)
+        heightView = 90;
     
     
     return CGSizeMake(collectionView.frame.size.width, heightView);
     return CGSizeMake(collectionView.frame.size.width, heightView);
 }
 }
@@ -157,8 +160,12 @@
     UIImageView *typeImage = (UIImageView *) [headerView viewWithTag:103];
     UIImageView *typeImage = (UIImageView *) [headerView viewWithTag:103];
     
     
     [dateLabel setFont:fontSizeData];
     [dateLabel setFont:fontSizeData];
-    dateLabel.textColor = [UIColor colorWithRed:130.0/255.0 green:130.0/255.0 blue:130.0/255.0 alpha:1.0];
-    dateLabel.text = [CCUtility getTitleSectionDate:date];
+    dateLabel.textColor = [UIColor colorWithRed:100.0/255.0 green:100.0/255.0 blue:100.0/255.0 alpha:1.0];
+    
+    if ([CCUtility getActivityVerboseDebug])
+        dateLabel.text = [NSDateFormatter localizedStringFromDate:date dateStyle:NSDateFormatterMediumStyle timeStyle:NSDateFormatterMediumStyle];
+    else
+        dateLabel.text = [CCUtility getTitleSectionDate:date];
     
     
     [actionLabel setFont:fontSizeAction];
     [actionLabel setFont:fontSizeAction];
     actionLabel.text = [NSString stringWithFormat:@"%@ %@", activity.action, activity.file];
     actionLabel.text = [NSString stringWithFormat:@"%@ %@", activity.action, activity.file];