瀏覽代碼

change routine converted Byte Formatter

Marino Faggiana 7 年之前
父節點
當前提交
5a6407b97d
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      iOSClient/Utility/CCUtility.m

+ 9 - 1
iOSClient/Utility/CCUtility.m

@@ -560,6 +560,13 @@
 
 + (NSString *)transformedSize:(double)value
 {
+    NSString *string = [NSByteCountFormatter stringFromByteCount:value countStyle:NSByteCountFormatterCountStyleFile];
+    return string;
+    /*
+    NSLog(@"%@", string);
+    
+    
+    
     int multiplyFactor = 0;
     
     NSArray *tokens = [NSArray arrayWithObjects:@"bytes",@"KB",@"MB",@"GB",@"TB",@"PB",@"EB",@"ZB",@"YB",nil];
@@ -567,7 +574,8 @@
         value /= 1024;
         multiplyFactor++;
     }
-    return [NSString stringWithFormat:@"%4.2f %@",value, [tokens objectAtIndex:multiplyFactor]];
+    return [NSString stringWithFormat:@"%4.2f %@ - %@",value, [tokens objectAtIndex:multiplyFactor], string];
+    */
 }
 
 // Remove do not forbidden characters for Nextcloud Server