Marino Faggiana 8 жил өмнө
parent
commit
3e58749bd2

+ 0 - 1
iOSClient/CCGlobal.h

@@ -233,7 +233,6 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define selectorSave                        @"save"
 #define selectorShare                       @"share"
 #define selectorSearch                      @"search"
-#define selectorOfflineFolder               @"offlineFolder"
 #define selectorUnshare                     @"unshare"
 #define selectorUpdateShare                 @"updateShare"
 #define selectorUploadAutomatic             @"uploadAutomatic"

+ 2 - 1
iOSClient/Main/CCMain.m

@@ -519,7 +519,8 @@
             BOOL isOfflineDirectory = [CCCoreData isOfflineDirectoryServerUrl:_serverUrl activeAccount:app.activeAccount];
             
             if (isOfflineDirectory) {
-                self.navigationItem.titleView = [CCGraphics navigationBarTitle:_titleMain image:[UIImage imageNamed:image_offlineTitle]];
+                self.navigationItem.titleView = [CCGraphics navigationBarTitle:_titleMain image:[UIImage imageNamed:image_offlineTitle] frame:self.navigationController.navigationBar.frame];
+                
             } else
                 self.navigationItem.title = _titleMain;
         }

+ 2 - 3
iOSClient/Offline/CCOfflineFileFolder.m

@@ -75,10 +75,9 @@
                 CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
         
                 metadataNet.action = actionReadFolder;
-                metadataNet.date = [NSDate date];
                 metadataNet.directoryID = directory.directoryID;
                 metadataNet.priority = NSOperationQueuePriorityVeryLow;
-                metadataNet.selector = selectorOfflineFolder;
+                metadataNet.selector = selectorReadFolder;
                 metadataNet.serverUrl = directory.serverUrl;
         
                 [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
@@ -162,7 +161,7 @@
     
     __block NSMutableArray *metadatasForOfflineFolder = [[NSMutableArray alloc] init];
     
-    if ([recordAccount.account isEqualToString:metadataNet.account] == NO && [metadataNet.selector isEqualToString:selectorOfflineFolder])
+    if ([recordAccount.account isEqualToString:metadataNet.account] == NO)
         return;
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{

+ 1 - 1
iOSClient/Settings/CCSettings.m

@@ -153,7 +153,7 @@
     section = [XLFormSectionDescriptor formSection];
     [form addFormSection:section];
     
-    section.footerTitle = @"Nextcloud © 2016 T.W.S. Inc.";
+    section.footerTitle = @"Nextcloud © 2017 T.W.S. Inc.";
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];

+ 1 - 1
iOSClient/Utility/CCGraphics.h

@@ -39,6 +39,6 @@
 
 + (UIImage *)scaleImage:(UIImage *)image toSize:(CGSize)targetSize;
 
-+ (UIView *)navigationBarTitle:(NSString *)title image:(UIImage *)image;
++ (UIView *)navigationBarTitle:(NSString *)title image:(UIImage *)image frame:(CGRect)frame;
 
 @end

+ 5 - 2
iOSClient/Utility/CCGraphics.m

@@ -233,13 +233,16 @@
 #endif
 }
 
-+ (UIView *)navigationBarTitle:(NSString *)title image:(UIImage *)image
++ (UIView *)navigationBarTitle:(NSString *)title image:(UIImage *)image frame:(CGRect)frame
 {
     UIView *view = [UIView new];
     UILabel *label = [UILabel new];
         
     title = [@" " stringByAppendingString:title];
-    label.text =  [title stringByTruncatingToWidth:150 withFont:label.font atEnd:YES];
+    NSInteger width = floor(frame.size.width/3);
+    if (width < 80)
+        width = 80;
+    label.text =  [title stringByTruncatingToWidth:width withFont:label.font atEnd:YES];
     
     label.textAlignment = NSTextAlignmentCenter;
     [label sizeToFit];