Browse Source

Change favorite to Offline

Marino Faggiana 8 years ago
parent
commit
7b5b81c8e6
83 changed files with 1412 additions and 232 deletions
  1. 27 25
      Nextcloud.xcodeproj/project.pbxproj
  2. 3 3
      iOSClient/AppDelegate.h
  3. 20 19
      iOSClient/AppDelegate.m
  4. 4 4
      iOSClient/CCGlobal.h
  5. 9 7
      iOSClient/CCImages.h
  6. 4 4
      iOSClient/FileSystem/CCCoreData.h
  7. 12 12
      iOSClient/FileSystem/CCCoreData.m
  8. 1 1
      iOSClient/FileSystem/TableLocalFile+CoreDataProperties.h
  9. 1 1
      iOSClient/FileSystem/TableLocalFile+CoreDataProperties.m
  10. BIN
      iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite.png
  11. BIN
      iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite@2x.png
  12. BIN
      iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite@3x.png
  13. 0 23
      iOSClient/Images.xcassets/cellFavorite.imageset/Contents.json
  14. BIN
      iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite.png
  15. BIN
      iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite@2x.png
  16. BIN
      iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite@3x.png
  17. BIN
      iOSClient/Images.xcassets/favorite.imageset/favorite.png
  18. BIN
      iOSClient/Images.xcassets/favorite.imageset/favorite@2x.png
  19. BIN
      iOSClient/Images.xcassets/favorite.imageset/favorite@3x.png
  20. BIN
      iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto.png
  21. BIN
      iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto@2x.png
  22. BIN
      iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto@3x.png
  23. 0 23
      iOSClient/Images.xcassets/navBarFavorite.imageset/Contents.json
  24. BIN
      iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite.png
  25. BIN
      iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite@2x.png
  26. BIN
      iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite@3x.png
  27. 3 3
      iOSClient/Images.xcassets/navBarOffline.imageset/Contents.json
  28. BIN
      iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@1x.png
  29. BIN
      iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@2x.png
  30. BIN
      iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@3x.png
  31. 5 5
      iOSClient/Images.xcassets/offlinecrypto.imageset/Contents.json
  32. BIN
      iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@1x.png
  33. BIN
      iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@2x.png
  34. BIN
      iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@3x.png
  35. 0 23
      iOSClient/Images.xcassets/tabBarFavorite.imageset/Contents.json
  36. BIN
      iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite.png
  37. BIN
      iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite@2x.png
  38. BIN
      iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite@3x.png
  39. 5 5
      iOSClient/Images.xcassets/tabBarOffline.imageset/Contents.json
  40. BIN
      iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@1x.png
  41. BIN
      iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@2x.png
  42. BIN
      iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@3x.png
  43. 1 1
      iOSClient/Intro/CCIntro.m
  44. 1 1
      iOSClient/Main/CCCellMain.h
  45. 4 4
      iOSClient/Main/CCCellMain.xib
  46. 1 1
      iOSClient/Main/CCCellMainTransfer.h
  47. 2 2
      iOSClient/Main/CCDetail.m
  48. 34 34
      iOSClient/Main/CCMain.m
  49. 7 7
      iOSClient/Main/Main.storyboard
  50. 5 5
      iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/Contents.json
  51. BIN
      iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@1x.png
  52. BIN
      iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@2x.png
  53. BIN
      iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@3x.png
  54. BIN
      iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@1x.png
  55. BIN
      iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@2x.png
  56. BIN
      iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@3x.png
  57. BIN
      iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite.png
  58. BIN
      iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite@2x.png
  59. BIN
      iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite@3x.png
  60. 5 5
      iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/Contents.json
  61. BIN
      iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline.png
  62. BIN
      iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline@2x.png
  63. BIN
      iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline@3x.png
  64. 23 0
      iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/Contents.json
  65. BIN
      iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@1x.png
  66. BIN
      iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@2x.png
  67. BIN
      iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@3x.png
  68. 23 0
      iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/Contents.json
  69. BIN
      iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@1x.png
  70. BIN
      iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@2x.png
  71. BIN
      iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@3x.png
  72. 40 0
      iOSClient/Offline/CCCellOffline.h
  73. 59 0
      iOSClient/Offline/CCCellOffline.m
  74. 77 0
      iOSClient/Offline/CCCellOffline.xib
  75. 56 0
      iOSClient/Offline/CCOffline.h
  76. 692 0
      iOSClient/Offline/CCOffline.m
  77. 5 5
      iOSClient/Settings/CCSettings.m
  78. 4 4
      iOSClient/Synchronization/CCSynchronization.m
  79. 1 1
      iOSClient/cryptocloud.xcdatamodeld/.xccurrentversion
  80. 135 0
      iOSClient/cryptocloud.xcdatamodeld/cryptocloud 6.xcdatamodel/contents
  81. 135 0
      iOSClient/cryptocloud.xcdatamodeld/cryptocloud 7.xcdatamodel/contents
  82. 2 2
      iOSClient/en.lproj/Intro.strings
  83. 6 2
      iOSClient/en.lproj/Localizable.strings

+ 27 - 25
Nextcloud.xcodeproj/project.pbxproj

@@ -268,7 +268,6 @@
 		F77B0E301D118A16002130FE /* CCHud.m in Sources */ = {isa = PBXBuildFile; fileRef = F7514EDB1C7B1336008F3338 /* CCHud.m */; };
 		F77B0E311D118A16002130FE /* CCExifGeo.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A54C351C6267B500E2C8BF /* CCExifGeo.m */; };
 		F77B0E321D118A16002130FE /* HRCgUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F0DE31C889300008DAB36 /* HRCgUtil.m */; };
-		F77B0E331D118A16002130FE /* CCCellFavorite.m in Sources */ = {isa = PBXBuildFile; fileRef = F7AB19C61BAF01A60027D7BA /* CCCellFavorite.m */; };
 		F77B0E341D118A16002130FE /* TableAccount+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B446551C4D29E300DBCC11 /* TableAccount+CoreDataProperties.m */; };
 		F77B0E351D118A16002130FE /* NYXImagesHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04D41C889184008DAB36 /* NYXImagesHelper.m */; };
 		F77B0E361D118A16002130FE /* ZSSBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F0DEE1C889300008DAB36 /* ZSSBarButtonItem.m */; };
@@ -380,7 +379,6 @@
 		F77B0ED31D118A16002130FE /* PPImageScrollingCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F05211C889184008DAB36 /* PPImageScrollingCellView.m */; };
 		F77B0ED41D118A16002130FE /* LMMediaPlayerHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F0F311C889339008DAB36 /* LMMediaPlayerHelper.m */; };
 		F77B0ED51D118A16002130FE /* PHAsset+Utility.m in Sources */ = {isa = PBXBuildFile; fileRef = F777F0311C29717F00CE81CB /* PHAsset+Utility.m */; };
-		F77B0ED71D118A16002130FE /* CCFavorite.m in Sources */ = {isa = PBXBuildFile; fileRef = F7AB19C91BAF01A60027D7BA /* CCFavorite.m */; };
 		F77B0ED81D118A16002130FE /* TableLocalFile+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B446451C4D29E300DBCC11 /* TableLocalFile+CoreDataProperties.m */; };
 		F77B0ED91D118A16002130FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F67BAD1A24D27800EE80DA /* main.m */; };
 		F77B0EEA1D118A16002130FE /* ZSSbold@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0D921C889300008DAB36 /* ZSSbold@2x.png */; };
@@ -411,7 +409,6 @@
 		F77B0F061D118A16002130FE /* PlayButtonOverlayLarge@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0C771C8892DF008DAB36 /* PlayButtonOverlayLarge@3x.png */; };
 		F77B0F071D118A16002130FE /* ZSSpicker.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0DBB1C889300008DAB36 /* ZSSpicker.png */; };
 		F77B0F081D118A16002130FE /* ZSSunderline@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0DCE1C889300008DAB36 /* ZSSunderline@2x.png */; };
-		F77B0F091D118A16002130FE /* CCCellFavorite.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7AB19C71BAF01A60027D7BA /* CCCellFavorite.xib */; };
 		F77B0F0A1D118A16002130FE /* Reader-Mark-Y.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0EAE1C889317008DAB36 /* Reader-Mark-Y.png */; };
 		F77B0F0B1D118A16002130FE /* UIBarButtonItemGrid@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0C821C8892DF008DAB36 /* UIBarButtonItemGrid@2x.png */; };
 		F77B0F0C1D118A16002130FE /* Reader-Mark-Y@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F70F0EAF1C889317008DAB36 /* Reader-Mark-Y@2x.png */; };
@@ -548,6 +545,9 @@
 		F7BB14971D5B62C000ECEE68 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F70A63071D5B3467004E2AA5 /* libssl.a */; };
 		F7BE6E2F1D2D5C3B00106933 /* CCQuickActions.m in Sources */ = {isa = PBXBuildFile; fileRef = F7BE6E2C1D2D5C3B00106933 /* CCQuickActions.m */; };
 		F7BF1B431D51E893000854F6 /* CCLoginNCOC.m in Sources */ = {isa = PBXBuildFile; fileRef = F7BF1B401D51E893000854F6 /* CCLoginNCOC.m */; };
+		F7C00D471E2D0D0F0032160B /* CCCellOffline.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C00D431E2D0D0F0032160B /* CCCellOffline.m */; };
+		F7C00D481E2D0D0F0032160B /* CCCellOffline.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7C00D441E2D0D0F0032160B /* CCCellOffline.xib */; };
+		F7C00D491E2D0D0F0032160B /* CCOffline.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C00D461E2D0D0F0032160B /* CCOffline.m */; };
 		F7CE28851D1ACFA70025783C /* CCProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7CE28801D1ACFA70025783C /* CCProgressView.m */; };
 		F7CE28881D1ACFA70025783C /* UINavigationController+CCProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = F7CE28821D1ACFA70025783C /* UINavigationController+CCProgress.m */; };
 		F7D2677C1E157053005ACB7E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7F67BB81A24D27800EE80DA /* Images.xcassets */; };
@@ -1403,11 +1403,6 @@
 		F7A54C351C6267B500E2C8BF /* CCExifGeo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCExifGeo.m; sourceTree = "<group>"; };
 		F7A582D61A24DAB500E903D7 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = AppDelegate.m; sourceTree = "<group>"; };
 		F7A582D71A24DAB500E903D7 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppDelegate.h; sourceTree = "<group>"; };
-		F7AB19C51BAF01A60027D7BA /* CCCellFavorite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellFavorite.h; sourceTree = "<group>"; };
-		F7AB19C61BAF01A60027D7BA /* CCCellFavorite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellFavorite.m; sourceTree = "<group>"; };
-		F7AB19C71BAF01A60027D7BA /* CCCellFavorite.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCCellFavorite.xib; sourceTree = "<group>"; };
-		F7AB19C81BAF01A60027D7BA /* CCFavorite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFavorite.h; sourceTree = "<group>"; };
-		F7AB19C91BAF01A60027D7BA /* CCFavorite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCFavorite.m; sourceTree = "<group>"; };
 		F7AB79EF1BB1A3AD00A82F32 /* CCManageOptimizations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCManageOptimizations.h; sourceTree = "<group>"; };
 		F7AB79F01BB1A3AD00A82F32 /* CCManageOptimizations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCManageOptimizations.m; sourceTree = "<group>"; };
 		F7ACE4291BAC0268006C0017 /* Acknowledgements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Acknowledgements.h; sourceTree = "<group>"; };
@@ -1451,6 +1446,12 @@
 		F7BFCCBF1B68C21900548E76 /* CCManageAsset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCManageAsset.m; sourceTree = "<group>"; };
 		F7BFCCC01B68C21900548E76 /* CCManageLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCManageLocation.h; sourceTree = "<group>"; };
 		F7BFCCC11B68C21900548E76 /* CCManageLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCManageLocation.m; sourceTree = "<group>"; };
+		F7C00D421E2D0D0F0032160B /* CCCellOffline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellOffline.h; sourceTree = "<group>"; };
+		F7C00D431E2D0D0F0032160B /* CCCellOffline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellOffline.m; sourceTree = "<group>"; };
+		F7C00D441E2D0D0F0032160B /* CCCellOffline.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCCellOffline.xib; sourceTree = "<group>"; };
+		F7C00D451E2D0D0F0032160B /* CCOffline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCOffline.h; sourceTree = "<group>"; };
+		F7C00D461E2D0D0F0032160B /* CCOffline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCOffline.m; sourceTree = "<group>"; };
+		F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "cryptocloud 7.xcdatamodel"; sourceTree = "<group>"; };
 		F7C0F46E1C8880540059EC54 /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ShareViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		F7C0F46F1C8880540059EC54 /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShareViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		F7C1D8BA1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text; name = nl; path = nl.lproj/TTOpenInAppActivityLocalizable.string; sourceTree = "<group>"; };
@@ -2882,18 +2883,6 @@
 			name = Table;
 			sourceTree = "<group>";
 		};
-		F7AB19C41BAF01A60027D7BA /* Favorite */ = {
-			isa = PBXGroup;
-			children = (
-				F7AB19C51BAF01A60027D7BA /* CCCellFavorite.h */,
-				F7AB19C61BAF01A60027D7BA /* CCCellFavorite.m */,
-				F7AB19C71BAF01A60027D7BA /* CCCellFavorite.xib */,
-				F7AB19C81BAF01A60027D7BA /* CCFavorite.h */,
-				F7AB19C91BAF01A60027D7BA /* CCFavorite.m */,
-			);
-			path = Favorite;
-			sourceTree = "<group>";
-		};
 		F7ACE4281BAC0268006C0017 /* Settings */ = {
 			isa = PBXGroup;
 			children = (
@@ -2990,6 +2979,18 @@
 			path = Utility;
 			sourceTree = "<group>";
 		};
+		F7C00D411E2D0D0F0032160B /* Offline */ = {
+			isa = PBXGroup;
+			children = (
+				F7C00D421E2D0D0F0032160B /* CCCellOffline.h */,
+				F7C00D431E2D0D0F0032160B /* CCCellOffline.m */,
+				F7C00D441E2D0D0F0032160B /* CCCellOffline.xib */,
+				F7C00D451E2D0D0F0032160B /* CCOffline.h */,
+				F7C00D461E2D0D0F0032160B /* CCOffline.m */,
+			);
+			path = Offline;
+			sourceTree = "<group>";
+		};
 		F7C0F46D1C8880540059EC54 /* Share Ext */ = {
 			isa = PBXGroup;
 			children = (
@@ -3174,7 +3175,6 @@
 				F7596C771D128FC80092A6B8 /* Nextcloud.xcassets */,
 				F70211F31BAC56E9003FC03E /* Main */,
 				F7ECBA6B1E239DCD003E6328 /* Create */,
-				F7AB19C41BAF01A60027D7BA /* Favorite */,
 				F7E95CEC1AC40BA40060D08E /* FileSystem */,
 				F744BE911BEBB2EE004FFF66 /* Intro */,
 				F7BFFA621A24D7300044ED85 /* Login */,
@@ -3182,6 +3182,7 @@
 				F7D6A0881D82DBFA0045AD1A /* MenuAccount+ControlCenter */,
 				F7F9E3451BC26B19004B9223 /* Move */,
 				F74D3DB81BAC1941000BAE4B /* Networking */,
+				F7C00D411E2D0D0F0032160B /* Offline */,
 				F7FCFFD51D70798C000E6E29 /* PeekPop */,
 				F719FDAE1CF06645004895D0 /* PhotosCameraUpload */,
 				F7BE6E2A1D2D5C3B00106933 /* QuickActions */,
@@ -3552,6 +3553,7 @@
 				F75ADF451DC75FFE008A7347 /* CCLogin.storyboard in Resources */,
 				F77B0EEA1D118A16002130FE /* ZSSbold@2x.png in Resources */,
 				F77B0EEB1D118A16002130FE /* ZSSrightjustify@2x.png in Resources */,
+				F7C00D481E2D0D0F0032160B /* CCCellOffline.xib in Resources */,
 				F77B0EEC1D118A16002130FE /* ZSSindent@2x.png in Resources */,
 				F77B0EED1D118A16002130FE /* Reader-Mark-N@2x.png in Resources */,
 				F77B0EEE1D118A16002130FE /* VideoOverlay@2x.png in Resources */,
@@ -3583,7 +3585,6 @@
 				F77B0F061D118A16002130FE /* PlayButtonOverlayLarge@3x.png in Resources */,
 				F77B0F071D118A16002130FE /* ZSSpicker.png in Resources */,
 				F77B0F081D118A16002130FE /* ZSSunderline@2x.png in Resources */,
-				F77B0F091D118A16002130FE /* CCCellFavorite.xib in Resources */,
 				F77B0F0A1D118A16002130FE /* Reader-Mark-Y.png in Resources */,
 				F77B0F0B1D118A16002130FE /* UIBarButtonItemGrid@2x.png in Resources */,
 				F77B0F0C1D118A16002130FE /* Reader-Mark-Y@2x.png in Resources */,
@@ -3918,6 +3919,7 @@
 				F7659A581DC0B760004860C4 /* NSIndexPath+PSTCollectionViewAdditions.m in Sources */,
 				F72764651DB8FE2A002334CD /* CCSynchronization.m in Sources */,
 				F7659A681DC0B760004860C4 /* PSTCollectionViewUpdateItem.m in Sources */,
+				F7C00D471E2D0D0F0032160B /* CCCellOffline.m in Sources */,
 				F77B0E071D118A16002130FE /* ioapi.c in Sources */,
 				F77B0E0D1D118A16002130FE /* CCSecurityOptions.m in Sources */,
 				F73CCDF11DC13776007E38D8 /* XLFormStepCounterCell.m in Sources */,
@@ -3964,7 +3966,6 @@
 				F77B0E311D118A16002130FE /* CCExifGeo.m in Sources */,
 				F77B0E321D118A16002130FE /* HRCgUtil.m in Sources */,
 				F7F06EB71DBFACC600099AE9 /* CTAssetsGridViewFooter.m in Sources */,
-				F77B0E331D118A16002130FE /* CCCellFavorite.m in Sources */,
 				F7F06EB91DBFACC600099AE9 /* CTAssetsGridViewLayout.m in Sources */,
 				F77B0E341D118A16002130FE /* TableAccount+CoreDataProperties.m in Sources */,
 				F77B0E351D118A16002130FE /* NYXImagesHelper.m in Sources */,
@@ -4146,6 +4147,7 @@
 				F77B0ECB1D118A16002130FE /* HRBrightnessCursor.m in Sources */,
 				F77B0ECC1D118A16002130FE /* UIImage+Masking.m in Sources */,
 				F77B0ECE1D118A16002130FE /* NSData+CommonCrypto.m in Sources */,
+				F7C00D491E2D0D0F0032160B /* CCOffline.m in Sources */,
 				F77B0ECF1D118A16002130FE /* CYRToken.m in Sources */,
 				F7F06EB11DBFACC600099AE9 /* CTAssetsGridView.m in Sources */,
 				F7D6A0931D82DBFA0045AD1A /* CCControlCenterCell.m in Sources */,
@@ -4155,7 +4157,6 @@
 				F77B0ED41D118A16002130FE /* LMMediaPlayerHelper.m in Sources */,
 				F77B0ED51D118A16002130FE /* PHAsset+Utility.m in Sources */,
 				F7F06E991DBFACC600099AE9 /* PHImageManager+CTAssetsPickerController.m in Sources */,
-				F77B0ED71D118A16002130FE /* CCFavorite.m in Sources */,
 				F77B0ED81D118A16002130FE /* TableLocalFile+CoreDataProperties.m in Sources */,
 				F7F06EBB1DBFACC600099AE9 /* CTAssetsNavigationController.m in Sources */,
 				F77B0ED91D118A16002130FE /* main.m in Sources */,
@@ -4713,13 +4714,14 @@
 		F78088E51DD3A1DB005C5A7C /* cryptocloud.xcdatamodeld */ = {
 			isa = XCVersionGroup;
 			children = (
+				F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */,
 				F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */,
 				F78088E61DD3A1DB005C5A7C /* cryptocloud 2.xcdatamodel */,
 				F78088E71DD3A1DB005C5A7C /* cryptocloud 3.xcdatamodel */,
 				F78088E81DD3A1DB005C5A7C /* cryptocloud 4.xcdatamodel */,
 				F78088E91DD3A1DB005C5A7C /* cryptocloud.xcdatamodel */,
 			);
-			currentVersion = F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */;
+			currentVersion = F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */;
 			path = cryptocloud.xcdatamodeld;
 			sourceTree = "<group>";
 			versionGroupType = wrapper.xcdatamodel;

+ 3 - 3
iOSClient/AppDelegate.h

@@ -38,7 +38,7 @@
 #import "CCQuickActions.h"
 #import "CCMain.h"
 #import "CCPhotosCameraUpload.h"
-#import "CCFavorite.h"
+#import "CCOffline.h"
 #import "CCSettings.h"
 
 @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
@@ -136,7 +136,7 @@
 @property (nonatomic, strong) CCMain *homeMain;
 @property (nonatomic, strong) CCPhotosCameraUpload *activePhotosCameraUpload;
 @property (nonatomic, retain) CCDetail *activeDetail;
-@property (nonatomic, retain) CCFavorite *activeFavorite;
+@property (nonatomic, retain) CCOffline *activeOffline;
 @property (nonatomic, retain) CCSettings *activeSettings;
 
 @property (nonatomic, strong) NSMutableDictionary *listMainVC;
@@ -145,7 +145,7 @@
 // ico Image Cache
 @property (nonatomic, strong) NSMutableDictionary *icoImagesCache;
 
-// Favorite - LocalStorage
+// Offline - LocalStorage
 @property BOOL isLocalStorage;
 
 // check isDeviceJailbroken

+ 20 - 19
iOSClient/AppDelegate.m

@@ -30,7 +30,7 @@
 #import "CCNetworking.h"
 #import "CCCoreData.h"
 #import "CCCrypto.h"
-#import "CCFavorite.h"
+#import "CCOffline.h"
 #import "CCManageAsset.h"
 #import "CCGraphics.h"
 #import "CCPhotosCameraUpload.h"
@@ -370,8 +370,8 @@
     // 1 sec.
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
         
-        NSLog(@"[LOG] Synchronize Favorites");
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"synchronizedFavorites" object:nil];
+        NSLog(@"[LOG] Synchronize Offline");
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"synchronizedOffline" object:nil];
         
         NSLog(@"[LOG] Synchronize Folders");
         [[CCSynchronization sharedSynchronization] synchronizationFolders];
@@ -447,17 +447,18 @@
     UIApplicationShortcutIcon *shortcutPhotosIcon = [UIApplicationShortcutIcon iconWithTemplateImageName:image_quickActionPhotos];
     UIApplicationShortcutIcon *shortcutUploadClearIcon = [UIApplicationShortcutIcon iconWithTemplateImageName:image_quickActionUploadClear];
     UIApplicationShortcutIcon *shortcutUploadEncryptedIcon = [UIApplicationShortcutIcon iconWithTemplateImageName:image_quickActionUploadEncrypted];
+    UIApplicationShortcutIcon *shortcutIconTypeOffline = [UIApplicationShortcutIcon iconWithTemplateImageName:image_quickActionUploadOffline];
     
     UIApplicationShortcutItem *shortcutPhotos = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.photos", bundleId] localizedTitle:NSLocalizedString(@"_photo_camera_", nil) localizedSubtitle:nil icon:shortcutPhotosIcon userInfo:nil];
 
-    UIApplicationShortcutItem *shortcutFavorite = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.favorite", bundleId] localizedTitle:NSLocalizedString(@"_favorites_", nil) localizedSubtitle:nil icon:[UIApplicationShortcutIcon iconWithType:UIApplicationShortcutIconTypeFavorite] userInfo:nil];
+    UIApplicationShortcutItem *shortcutOffline = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.offline", bundleId] localizedTitle:NSLocalizedString(@"_offline_", nil) localizedSubtitle:nil icon:shortcutIconTypeOffline userInfo:nil];
     
     UIApplicationShortcutItem *shortcutUploadClear = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.uploadClear", bundleId] localizedTitle:NSLocalizedString(@"_upload_file_", nil) localizedSubtitle:nil icon:shortcutUploadClearIcon userInfo:nil];
     
     UIApplicationShortcutItem *shortcutUploadEncrypted = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.uploadEncrypted", bundleId] localizedTitle:NSLocalizedString(@"_upload_encrypted_file_", nil) localizedSubtitle:nil icon:shortcutUploadEncryptedIcon userInfo:nil];
     
     // add all items to an array
-    NSArray *items = @[shortcutUploadEncrypted, shortcutUploadClear, shortcutPhotos, shortcutFavorite];
+    NSArray *items = @[shortcutUploadEncrypted, shortcutUploadClear, shortcutPhotos, shortcutOffline];
     
     // add the array to our app
     [UIApplication sharedApplication].shortcutItems = items;
@@ -476,7 +477,7 @@
     
     NSString *bundleId = [NSBundle mainBundle].bundleIdentifier;
     
-    NSString *shortcutFavorite = [NSString stringWithFormat:@"%@.favorite", bundleId];
+    NSString *shortcutOffline = [NSString stringWithFormat:@"%@.offline", bundleId];
     NSString *shortcutPhotos = [NSString stringWithFormat:@"%@.photos", bundleId];
     NSString *shortcutUploadClear = [NSString stringWithFormat:@"%@.uploadClear", bundleId];
     NSString *shortcutUploadEncrypted = [NSString stringWithFormat:@"%@.uploadEncrypted", bundleId];
@@ -589,7 +590,7 @@
         handled = YES;
     }
     
-    else if ([shortcutItem.type isEqualToString:shortcutFavorite] && self.activeAccount) {
+    else if ([shortcutItem.type isEqualToString:shortcutOffline] && self.activeAccount) {
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
@@ -603,11 +604,11 @@
                     if ([nvc.topViewController isKindOfClass:[CCDetail class]])
                         [nvc popToRootViewControllerAnimated:NO];
                 
-                    if ([nvc.topViewController isKindOfClass:[CCFavorite class]])
-                        [(CCFavorite *)nvc.topViewController forcedSwitchFavorite];
+                    if ([nvc.topViewController isKindOfClass:[CCOffline class]])
+                        [(CCOffline *)nvc.topViewController forcedSwitchOffline];
                 }
             
-                [tbc setSelectedIndex:TabBarApplicationIndexFavorite];
+                [tbc setSelectedIndex:TabBarApplicationIndexOffline];
             
             } else {
             
@@ -616,11 +617,11 @@
             
                 UITabBarController *tbc = splitViewController.viewControllers.firstObject;
         
-                UINavigationController *ncFavorite = [tbc.viewControllers objectAtIndex:TabBarApplicationIndexFavorite];
-                if ([ncFavorite.topViewController isKindOfClass:[CCFavorite class]])
-                    [(CCFavorite *)ncFavorite.topViewController forcedSwitchFavorite];
+                UINavigationController *ncOffline = [tbc.viewControllers objectAtIndex:TabBarApplicationIndexOffline];
+                if ([ncOffline.topViewController isKindOfClass:[CCOffline class]])
+                    [(CCOffline *)ncOffline.topViewController forcedSwitchOffline];
             
-                [tbc setSelectedIndex:TabBarApplicationIndexFavorite];
+                [tbc setSelectedIndex:TabBarApplicationIndexOffline];
             }
         });
         
@@ -732,16 +733,16 @@
     item.image = [UIImage imageNamed:image_tabBarFile];
     item.selectedImage = [UIImage imageNamed:image_tabBarFile];
     
-    // Favorite - Local
-    item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexFavorite];
+    // Offline - Local
+    item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexOffline];
     if (app.isLocalStorage) {
         [item setTitle:NSLocalizedString(@"_local_storage_", nil)];
         item.image = [UIImage imageNamed:image_tabBarLocal];
         item.selectedImage = [UIImage imageNamed:image_tabBarLocal];
     } else {
-        [item setTitle:NSLocalizedString(@"_favorites_", nil)];
-        item.image = [UIImage imageNamed:image_tabBarFavorite];
-        item.selectedImage = [UIImage imageNamed:image_tabBarFavorite];
+        [item setTitle:NSLocalizedString(@"_offline_", nil)];
+        item.image = [UIImage imageNamed:image_tabBarOffline];
+        item.selectedImage = [UIImage imageNamed:image_tabBarOffline];
     }
     
     // Hide (PLUS)

+ 4 - 4
iOSClient/CCGlobal.h

@@ -208,7 +208,7 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define uploadSessionID @"ID_UPLOAD_"
 
 // Metadata.Net SELECTOR
-#define selectorAddFavorite             @"addFavorite"
+#define selectorAddOffline              @"addOffline"
 #define selectorAddLocal                @"addLocal"
 #define selectorBrowseImages            @"browseImages"
 #define selectorCreateFolder            @"createFolder"
@@ -230,7 +230,7 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define selectorOpenIn                  @"openIn"
 #define selectorOpenWindowShare         @"openWindowShare"
 #define selectorReadFile                @"readFile"
-#define selectorReadFileFavorite        @"readFileFavorite"
+#define selectorReadFileOffline         @"readFileOffline"
 #define selectorReadFileFolder          @"readFileFolder"
 #define selectorReadFileUploadFile      @"readFileUploadFile"
 #define selectorReadFileVerifyUpload    @"readFileVerifyUpload"
@@ -276,7 +276,7 @@ extern NSString *const BKPasscodeKeychainServiceName;
 // Tipi di sorgente directory
 #define sorceDirectoryAccount           0
 #define sorceDirectoryLocal             1
-#define sorceDirectoryFavorite          2
+#define sorceDirectoryOffline           2
 
 // Metadata : FileType
 #define metadataTypeFile_audio          @"audio"
@@ -299,7 +299,7 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define metadataTypeFilenameCrypto      2
 
 #define TabBarApplicationIndexFile      0
-#define TabBarApplicationIndexFavorite  1
+#define TabBarApplicationIndexOffline   1
 #define TabBarApplicationIndexHide      2
 #define TabBarApplicationIndexPhotos    3
 #define TabBarApplicationIndexSettings  4

+ 9 - 7
iOSClient/CCImages.h

@@ -39,7 +39,7 @@
 #define image_actionSheetSynchronized           @"SynchronizedNextcloud"
 #define image_actionSheetReload                 @"reloadNextcloud"
 #define image_actionSheetOpenIn                 @"openInNextcloud"
-#define image_actionSheetFavorite               @"favoriteNextcloud"
+#define image_actionSheetOffline                @"actionSheetOfflineNextcloud"
 #define image_actionSheetLocal                  @"localStorageNextcloud"
 
 #ifdef CC
@@ -62,7 +62,7 @@
 #ifdef CC
 
 #define image_brandCameraUpload                 @"cryptocloudCameraUpload"
-#define image_brandFavorite                     @"cryptocloudFavorite"
+#define image_brandOffline                      @"cryptocloudOffline"
 #define image_brandLocal                        @"cryptocloudLocal"
 #define image_brandNavigationController         @"cryptocloud_navigationcontroller"
 #define image_brandNavigationController1        @"cryptocloud_navigationcontroller1"
@@ -76,7 +76,7 @@
 #ifdef NC
 
 #define image_brandCameraUpload                 @"nextcloudCameraUpload"
-#define image_brandFavorite                     @"nextcloudFavorite"
+#define image_brandOffline                      @"nextcloudOffline"
 #define image_brandLocal                        @"nextcloudLocal"
 #define image_brandNavigationController         @"nextcloud_navigationcontroller"
 #define image_brandNavigationController1        @"nextcloud_navigationcontroller1"
@@ -122,8 +122,8 @@
 #define image_encryptedSelectedFiles            @"encryptedSelectedFilesNextcloud"
 #endif
 
-#define image_favorite                          @"favorite"
-#define image_favoritecrypto                    @"favoritecrypto"
+#define image_offline                           @"offlineNextcloud"
+#define image_offlinecrypto                     @"offlinecrypto"
 #define image_file                              @"file"
 #define image_filePreviewDownload               @"filePreviewDownload"
 #define image_filePreviewDownloadCrypto         @"filePreviewDownloadCrypto"
@@ -179,7 +179,7 @@
 #define image_movie                             @"movie"
 #define image_moviecrypto                       @"moviecrypto"
 
-#define image_navBarFavorite                    @"navBarFavorite"
+#define image_navBarOffline                     @"navBarOffline"
 #define image_navBarLocal                       @"navBarLocal"
 
 #define image_openSelectedFiles                 @"openSelectedFiles"
@@ -196,12 +196,14 @@
 #define image_quickActionPhotos                 @"quickActionPhotos"
 #define image_quickActionUploadClear            @"quickActionUploadClear"
 #define image_quickActionUploadEncrypted        @"quickActionUploadEncrypted"
+#define image_quickActionUploadOffline          @"quickActionUploadOfflineNextcloud"
 #endif
 
 #ifdef NC
 #define image_quickActionPhotos                 @"quickActionPhotosNextcloud"
 #define image_quickActionUploadClear            @"quickActionUploadClearNextcloud"
 #define image_quickActionUploadEncrypted        @"quickActionUploadEncryptedNextcloud"
+#define image_quickActionUploadOffline          @"quickActionUploadOfflineNextcloud"
 #endif
 
 #define image_reloadtask                        @"reloadtask"
@@ -275,7 +277,7 @@
 #define image_tabBarFile                        @"tabBarNextcloud"
 #endif
 
-#define image_tabBarFavorite                    @"tabBarFavorite"
+#define image_tabBarOffline                     @"tabBarOffline"
 #define image_tabBarLocal                       @"tabBarLocal"
 #define image_tabBarPhotos                      @"tabBarPhotos"
 #define image_tabBarSettings                    @"tabBarSettings"

+ 4 - 4
iOSClient/FileSystem/CCCoreData.h

@@ -158,18 +158,18 @@
 // ===== LocalFile =====
 
 + (void)addLocalFile:(CCMetadata *)metadata activeAccount:(NSString *)activeAccount;
-+ (void)addFavorite:(NSString *)fileID activeAccount:(NSString *)activeAccount;
++ (void)addOffline:(NSString *)fileID activeAccount:(NSString *)activeAccount;
 
 + (void)deleteLocalFileWithPredicate:(NSPredicate *)predicate;
-+ (void)removeFavoriteFromFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount;
++ (void)removeOfflineFromFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount;
 
 + (void)renameLocalFileWithFileID:(NSString *)fileID fileNameTo:(NSString *)fileNameTo fileNamePrintTo:(NSString *)fileNamePrintTo activeAccount:(NSString *)activeAccount;
 + (void)updateLocalFileModel:(CCMetadata *)metadata activeAccount:(NSString *)activeAccount;
 
-+ (BOOL)isFavorite:(NSString *)fileID activeAccount:(NSString *)activeAccount;
++ (BOOL)isOffline:(NSString *)fileID activeAccount:(NSString *)activeAccount;
 
 + (TableLocalFile *)getLocalFileWithFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount;
-+ (NSArray *)getFavoriteWithControlZombie:(BOOL)controlZombie activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser;
++ (NSArray *)getOfflineWithControlZombie:(BOOL)controlZombie activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser;
 + (NSArray *)getTableLocalFileWithPredicate:(NSPredicate *)predicate;
 
 + (NSArray *)getGeoInformationLocalFromFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount;

+ 12 - 12
iOSClient/FileSystem/CCCoreData.m

@@ -1237,14 +1237,14 @@
 {
     [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
         
-        BOOL favorite = NO;
+        BOOL offline = NO;
     
         NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(account == %@) AND (fileID == %@)", activeAccount, metadata.fileID];
         TableLocalFile *record = [TableLocalFile MR_findFirstWithPredicate:predicate inContext:localContext];
         
         if (record) {
             
-            favorite = [[record valueForKey:@"favorite"] boolValue];
+            offline = [[record valueForKey:@"offline"] boolValue];
             
             [record MR_deleteEntityInContext:localContext];
         }
@@ -1260,7 +1260,7 @@
         record.exifLatitude = @"-1";
         record.exifLongitude = @"-1";
         
-        record.favorite = [NSNumber numberWithBool:favorite];
+        record.offline = [NSNumber numberWithBool:offline];
         record.fileName = metadata.fileName;
         record.fileNamePrint = metadata.fileNamePrint;
         record.rev = metadata.rev;
@@ -1268,7 +1268,7 @@
     }];
 }
 
-+ (void)addFavorite:(NSString *)fileID activeAccount:(NSString *)activeAccount
++ (void)addOffline:(NSString *)fileID activeAccount:(NSString *)activeAccount
 {
     [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
         
@@ -1276,7 +1276,7 @@
         TableLocalFile *record = [TableLocalFile MR_findFirstWithPredicate:predicate inContext:localContext];
     
         if (record)
-            record.favorite = [NSNumber numberWithBool:YES];
+            record.offline = [NSNumber numberWithBool:YES];
     }];
 }
 
@@ -1288,7 +1288,7 @@
     }];
 }
 
-+ (void)removeFavoriteFromFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount
++ (void)removeOfflineFromFileID:(NSString *)fileID activeAccount:(NSString *)activeAccount
 {
     [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
         
@@ -1296,7 +1296,7 @@
         TableLocalFile *record = [TableLocalFile MR_findFirstWithPredicate:predicate inContext:localContext];
     
         if (record)
-            record.favorite = [NSNumber numberWithBool:NO];
+            record.offline = [NSNumber numberWithBool:NO];
     }];
 }
 
@@ -1336,9 +1336,9 @@
     }];
 }
 
-+ (BOOL)isFavorite:(NSString *)fileID activeAccount:(NSString *)activeAccount
++ (BOOL)isOffline:(NSString *)fileID activeAccount:(NSString *)activeAccount
 {
-    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(fileID == %@) AND (favorite == 1) AND (account == %@)", fileID, activeAccount];
+    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(fileID == %@) AND (offline == 1) AND (account == %@)", fileID, activeAccount];
     TableLocalFile *record = [TableLocalFile MR_findFirstWithPredicate:predicate];
     
     if (record) return YES;
@@ -1393,12 +1393,12 @@
     return [TableLocalFile MR_findAllWithPredicate:predicate];
 }
 
-+ (NSArray *)getFavoriteWithControlZombie:(BOOL)controlZombie activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser
++ (NSArray *)getOfflineWithControlZombie:(BOOL)controlZombie activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser
 {
     NSMutableArray *result = [[NSMutableArray alloc] init];
-    NSMutableArray *favorites = [self getTableLocalFileWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (favorite == 1)", activeAccount] controlZombie:controlZombie activeAccount:activeAccount directoryUser:directoryUser];
+    NSMutableArray *offline = [self getTableLocalFileWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (offline == 1)", activeAccount] controlZombie:controlZombie activeAccount:activeAccount directoryUser:directoryUser];
     
-    for (NSManagedObject *entity in favorites) {
+    for (NSManagedObject *entity in offline) {
         NSString *fileID = [entity valueForKey:@"fileID"];
         CCMetadata *metadata = [self getMetadataWithPreficate:[NSPredicate predicateWithFormat:@"(fileID == %@) AND (account == %@)", fileID, activeAccount] context:nil];
         if (metadata) [result addObject:[metadata copy]];

+ 1 - 1
iOSClient/FileSystem/TableLocalFile+CoreDataProperties.h

@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, retain) NSDate *exifDate;
 @property (nullable, nonatomic, retain) NSString *exifLatitude;
 @property (nullable, nonatomic, retain) NSString *exifLongitude;
-@property (nullable, nonatomic, retain) NSNumber *favorite;
+@property (nullable, nonatomic, retain) NSNumber *offline;
 @property (nullable, nonatomic, retain) NSString *fileID;
 @property (nullable, nonatomic, retain) NSString *fileName;
 @property (nullable, nonatomic, retain) NSString *fileNamePrint;

+ 1 - 1
iOSClient/FileSystem/TableLocalFile+CoreDataProperties.m

@@ -31,7 +31,7 @@
 @dynamic exifDate;
 @dynamic exifLatitude;
 @dynamic exifLongitude;
-@dynamic favorite;
+@dynamic offline;
 @dynamic fileName;
 @dynamic fileNamePrint;
 @dynamic fileID;

BIN
iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite.png


BIN
iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite@2x.png


BIN
iOSClient/Images.xcassets/actionSheetFavorite.imageset/actionSheetFavorite@3x.png


+ 0 - 23
iOSClient/Images.xcassets/cellFavorite.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "cellFavorite.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x",
-      "filename" : "cellFavorite@2x.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "cellFavorite@3x.png"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite.png


BIN
iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite@2x.png


BIN
iOSClient/Images.xcassets/cellFavorite.imageset/cellFavorite@3x.png


BIN
iOSClient/Images.xcassets/favorite.imageset/favorite.png


BIN
iOSClient/Images.xcassets/favorite.imageset/favorite@2x.png


BIN
iOSClient/Images.xcassets/favorite.imageset/favorite@3x.png


BIN
iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto.png


BIN
iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto@2x.png


BIN
iOSClient/Images.xcassets/favoritecrypto.imageset/favoritecrypto@3x.png


+ 0 - 23
iOSClient/Images.xcassets/navBarFavorite.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "navBarFavorite.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x",
-      "filename" : "navBarFavorite@2x.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "navBarFavorite@3x.png"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite.png


BIN
iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite@2x.png


BIN
iOSClient/Images.xcassets/navBarFavorite.imageset/navBarFavorite@3x.png


+ 3 - 3
iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/Contents.json → iOSClient/Images.xcassets/navBarOffline.imageset/Contents.json

@@ -2,17 +2,17 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "favoriteNextcloud@1x.png",
+      "filename" : "navBarOffline@1x.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "favoriteNextcloud@2x.png",
+      "filename" : "navBarOffline@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "filename" : "favoriteNextcloud@3x.png",
+      "filename" : "navBarOffline@3x.png",
       "scale" : "3x"
     }
   ],

BIN
iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@1x.png


BIN
iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@2x.png


BIN
iOSClient/Images.xcassets/navBarOffline.imageset/navBarOffline@3x.png


+ 5 - 5
iOSClient/Images.xcassets/favorite.imageset/Contents.json → iOSClient/Images.xcassets/offlinecrypto.imageset/Contents.json

@@ -2,18 +2,18 @@
   "images" : [
     {
       "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "favorite.png"
+      "filename" : "offlinecrypto@1x.png",
+      "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "favorite@2x.png",
+      "filename" : "offlinecrypto@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "favorite@3x.png"
+      "filename" : "offlinecrypto@3x.png",
+      "scale" : "3x"
     }
   ],
   "info" : {

BIN
iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@1x.png


BIN
iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@2x.png


BIN
iOSClient/Images.xcassets/offlinecrypto.imageset/offlinecrypto@3x.png


+ 0 - 23
iOSClient/Images.xcassets/tabBarFavorite.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "tabBarFavorite.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x",
-      "filename" : "tabBarFavorite@2x.png"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "tabBarFavorite@3x.png"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite.png


BIN
iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite@2x.png


BIN
iOSClient/Images.xcassets/tabBarFavorite.imageset/tabBarFavorite@3x.png


+ 5 - 5
iOSClient/Images.xcassets/favoritecrypto.imageset/Contents.json → iOSClient/Images.xcassets/tabBarOffline.imageset/Contents.json

@@ -2,18 +2,18 @@
   "images" : [
     {
       "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "favoritecrypto.png"
+      "filename" : "tabBarOffline@1x.png",
+      "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "favoritecrypto@2x.png",
+      "filename" : "tabBarOffline@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "favoritecrypto@3x.png"
+      "filename" : "tabBarOffline@3x.png",
+      "scale" : "3x"
     }
   ],
   "info" : {

BIN
iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@1x.png


BIN
iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@2x.png


BIN
iOSClient/Images.xcassets/tabBarOffline.imageset/tabBarOffline@3x.png


+ 1 - 1
iOSClient/Intro/CCIntro.m

@@ -145,7 +145,7 @@
     page4.showTitleView = NO;
     
     EAIntroPage *page5 = [EAIntroPage page];
-    page5.title = [CCUtility localizableBrand:@"_intro_09_" table:@"Intro"]; // "PREFERITI & ARCHIVIO LOCALE"
+    page5.title = [CCUtility localizableBrand:@"_intro_09_" table:@"Intro"]; // "OFFLINE & LOCAL"
     page5.titlePositionY = titlePositionY;
     page5.titleFont = RalewayMedium(20.0f);
     page5.desc = [CCUtility localizableBrand:@"_intro_10_" table:@"Intro"];

+ 1 - 1
iOSClient/Main/CCCellMain.h

@@ -27,7 +27,7 @@
 
 @property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *favoriteImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *offlineImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *synchronizedImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *sharedImageView;
 

+ 4 - 4
iOSClient/Main/CCCellMain.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -63,7 +63,7 @@
                             <constraint firstAttribute="width" constant="15" id="kOT-hZ-NLn"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Fw2-NW-hsK" userLabel="Favorite Image View">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Fw2-NW-hsK" userLabel="Offline Image View">
                         <rect key="frame" x="6" y="39" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="15" id="EkP-Tz-P1M"/>
@@ -94,10 +94,10 @@
             </tableViewCellContentView>
             <gestureRecognizers/>
             <connections>
-                <outlet property="favoriteImageView" destination="Fw2-NW-hsK" id="Dd4-Jf-ZKt"/>
                 <outlet property="fileImageView" destination="5" id="6"/>
                 <outlet property="labelInfoFile" destination="p7I-KN-FVZ" id="5Yb-hH-k73"/>
                 <outlet property="labelTitle" destination="QNC-8X-DAC" id="dFX-Cb-8IE"/>
+                <outlet property="offlineImageView" destination="Fw2-NW-hsK" id="5K1-gW-R2J"/>
                 <outlet property="sharedImageView" destination="qhJ-el-R92" id="UfT-CJ-QTC"/>
                 <outlet property="statusImageView" destination="DQR-yN-JaH" id="UmC-pt-kjV"/>
                 <outlet property="synchronizedImageView" destination="X2D-15-9A2" id="ssy-oV-gLg"/>

+ 1 - 1
iOSClient/Main/CCCellMainTransfer.h

@@ -27,7 +27,7 @@
 
 @property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *favoriteImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *offlineImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *synchronizedImageView;
 @property(nonatomic, weak) IBOutlet UIImageView *sharedImageView;
 

+ 2 - 2
iOSClient/Main/CCDetail.m

@@ -380,8 +380,8 @@
     [self.thumbs removeAllObjects];
     [_dataSourceDirectoryID removeAllObjects];
     
-    // Favorite
-    if (self.sourceDirectory == sorceDirectoryFavorite) {
+    // Offline
+    if (self.sourceDirectory == sorceDirectoryOffline) {
             
         self.dataSourceImagesVideos = (NSMutableArray *)[CCCoreData getTableMetadataWithPredicate:[NSPredicate predicateWithFormat:@"(fileID == %@) AND (account == %@)", self.metadataDetail.fileID, app.activeAccount] fieldOrder:[CCUtility getOrderSettings] ascending:[CCUtility getAscendingSettings]];
     }

+ 34 - 34
iOSClient/Main/CCMain.m

@@ -1161,9 +1161,9 @@
         [self getDataSourceWithReloadTableView:metadata.directoryID fileID:metadata.fileID selector:selector];
     }
     
-    // add Favorite
-    if ([selector isEqualToString:selectorAddFavorite]) {
-        [CCCoreData addFavorite:metadata.fileID activeAccount:app.activeAccount];
+    // add Offline
+    if ([selector isEqualToString:selectorAddOffline]) {
+        [CCCoreData addOffline:metadata.fileID activeAccount:app.activeAccount];
         [self getDataSourceWithReloadTableView:metadata.directoryID fileID:metadata.fileID selector:selector];
     }
     
@@ -2014,7 +2014,7 @@
         metadataNet.session = upload_session_foreground;
         metadataNet.taskStatus = taskStatusResume;
         
-        if ([CCCoreData isFavorite:metadata.fileID activeAccount:app.activeAccount]) metadataNet.selectorPost = selectorAddFavorite;
+        if ([CCCoreData isOffline:metadata.fileID activeAccount:app.activeAccount]) metadataNet.selectorPost = selectorAddOffline;
         
         [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
         
@@ -2043,7 +2043,7 @@
         metadataNet.session = upload_session_foreground;
         metadataNet.taskStatus = taskStatusResume;
         
-        if ([CCCoreData isFavorite:metadata.fileID activeAccount:app.activeAccount]) metadataNet.selectorPost = selectorAddFavorite;
+        if ([CCCoreData isOffline:metadata.fileID activeAccount:app.activeAccount]) metadataNet.selectorPost = selectorAddOffline;
         
         [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
     }
@@ -2923,31 +2923,31 @@
 }
 
 #pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== Favorite =====
+#pragma mark ===== Offline =====
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)addFavorite:(CCMetadata *)metadata
+- (void)addOffline:(CCMetadata *)metadata
 {
     if (metadata.errorPasscode || !metadata.uuid) return;
     
     if ([metadata.type isEqualToString:metadataType_file])
-        [[CCNetworking sharedNetworking] downloadFile:metadata serverUrl:_localServerUrl downloadData:YES downloadPlist:NO selector:selectorAddFavorite selectorPost:nil session:download_session taskStatus:taskStatusResume delegate:self];
+        [[CCNetworking sharedNetworking] downloadFile:metadata serverUrl:_localServerUrl downloadData:YES downloadPlist:NO selector:selectorAddOffline selectorPost:nil session:download_session taskStatus:taskStatusResume delegate:self];
     
     if ([metadata.type isEqualToString:metadataType_model])
-        [CCCoreData addFavorite:metadata.fileID activeAccount:app.activeAccount];
+        [CCCoreData addOffline:metadata.fileID activeAccount:app.activeAccount];
     
     NSIndexPath *indexPath = [_sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
     if (indexPath) [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic];
 }
 
-- (void)removeFavorite:(CCMetadata *)metadata
+- (void)removeOffline:(CCMetadata *)metadata
 {
-    [CCCoreData removeFavoriteFromFileID:metadata.fileID activeAccount:app.activeAccount];
+    [CCCoreData removeOfflineFromFileID:metadata.fileID activeAccount:app.activeAccount];
     
     NSIndexPath *indexPath = [_sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
     if (indexPath) [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic];
     
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableFavorite" object:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableOffline" object:nil];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -2967,7 +2967,7 @@
         
         [app messageNotification:@"_add_local_" description:@"_file_saved_local_" visible:YES delay:dismissAfterSecond type:TWMessageBarMessageTypeSuccess];
         
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableFavorite" object:nil];
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableOffline" object:nil];
     }
     
     NSIndexPath *indexPath = [_sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
@@ -4036,14 +4036,14 @@
 {
     _metadata = [self getMetadataFromSectionDataSource:indexPath];
     
-    NSString *titoloCriptaDecripta, *titoloPreferiti, *titoloLock, *titoloSynchronized;
+    NSString *titoloCriptaDecripta, *titoloOffline, *titoloLock, *titoloSynchronized;
     BOOL synchronized = NO;
     
     if (_metadata.cryptated) titoloCriptaDecripta = [NSString stringWithFormat:NSLocalizedString(@"_decrypt_", nil)];
     else titoloCriptaDecripta = [NSString stringWithFormat:NSLocalizedString(@"_encrypt_", nil)];
     
-    if ([CCCoreData isFavorite:_metadata.fileID activeAccount:app.activeAccount]) titoloPreferiti = [NSString stringWithFormat:NSLocalizedString(@"_remove_favorites_", nil)];
-    else titoloPreferiti = [NSString stringWithFormat:NSLocalizedString(@"_add_favorites_", nil)];
+    if ([CCCoreData isOffline:_metadata.fileID activeAccount:app.activeAccount]) titoloOffline = [NSString stringWithFormat:NSLocalizedString(@"_remove_offline_", nil)];
+    else titoloOffline = [NSString stringWithFormat:NSLocalizedString(@"_add_offline_", nil)];
     
     NSString *synchronizedServerUrl = [CCUtility stringAppendServerUrl:_localServerUrl addServerUrl:_metadata.fileNameData];
     if (_metadata.directory && [CCCoreData isSynchronizedDirectory:synchronizedServerUrl activeAccount:app.activeAccount]) {
@@ -4332,8 +4332,8 @@
                                     [self performSelector:@selector(cmdEncryptedDecryptedFile) withObject:nil afterDelay:0.1];
                                 }];
         
-        [actionSheet addButtonWithTitle:titoloPreferiti
-                                  image:[UIImage imageNamed:image_actionSheetFavorite]
+        [actionSheet addButtonWithTitle:titoloOffline
+                                  image:[UIImage imageNamed:image_actionSheetOffline]
                         backgroundColor:[UIColor whiteColor]
                                  height: 50.0
                                    type:AHKActionSheetButtonTypeDefault
@@ -4342,10 +4342,10 @@
                                     // close swipe
                                     [self setEditing:NO animated:YES];
                                     
-                                    if ([CCCoreData isFavorite:_metadata.fileID activeAccount:app.activeAccount])
-                                        [self removeFavorite:_metadata];
+                                    if ([CCCoreData isOffline:_metadata.fileID activeAccount:app.activeAccount])
+                                        [self removeOffline:_metadata];
                                     else
-                                        [self addFavorite:_metadata];
+                                        [self addOffline:_metadata];
                                 }];
 
 
@@ -4414,8 +4414,8 @@
                                     [self moveOpenWindow:[[NSArray alloc] initWithObjects:indexPath, nil]];
                                 }];
 
-        [actionSheet addButtonWithTitle:titoloPreferiti
-                                  image:[UIImage imageNamed:image_actionSheetFavorite]
+        [actionSheet addButtonWithTitle:titoloOffline
+                                  image:[UIImage imageNamed:image_actionSheetOffline]
                         backgroundColor:[UIColor whiteColor]
                                  height: 50.0
                                    type:AHKActionSheetButtonTypeDefault
@@ -4424,10 +4424,10 @@
                                     // close swipe
                                     [self setEditing:NO animated:YES];
                                     
-                                    if ([CCCoreData isFavorite:_metadata.fileID activeAccount:app.activeAccount])
-                                        [self removeFavorite:_metadata];
+                                    if ([CCCoreData isOffline:_metadata.fileID activeAccount:app.activeAccount])
+                                        [self removeOffline:_metadata];
                                     else
-                                        [self addFavorite:_metadata];
+                                        [self addOffline:_metadata];
                                 }];
 
         [actionSheet addButtonWithTitle:NSLocalizedString(@"_add_local_", nil)
@@ -4530,10 +4530,10 @@
     if (app.activeAccount == nil || app.activeUrl == nil || directoryID == nil)
         return;
     
-    // Reload -> Favorite ?
+    // Reload -> Offline ?
     if (fileID)
-        if ([CCCoreData isFavorite:fileID activeAccount:app.activeAccount])
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableFavorite" object:nil];
+        if ([CCCoreData isOffline:fileID activeAccount:app.activeAccount])
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableOffline" object:nil];
 
     // Reload -> Self se non siamo nella dir appropriata cercala e se è in memoria reindirizza il reload
     if ([directoryID isEqualToString:_localDirectoryID] == NO || _localServerUrl == nil) {
@@ -4871,7 +4871,7 @@
     
     cell.fileImageView.image = nil;
     cell.statusImageView.image = nil;
-    cell.favoriteImageView.image = nil;
+    cell.offlineImageView.image = nil;
     cell.synchronizedImageView.image = nil;
     cell.sharedImageView.image = nil;
     
@@ -5025,13 +5025,13 @@
     if (metadata.directory && ([CCCoreData isDirectoryLock:lockServerUrl activeAccount:app.activeAccount] && [[CCUtility getBlockCode] length])) cell.statusImageView.image = [UIImage imageNamed:image_passcode];
     
     // ----------------------------------------------------------------------------------------------------------
-    // Favorite
+    // Offline
     // ----------------------------------------------------------------------------------------------------------
 
-    if ([CCCoreData isFavorite:metadata.fileID activeAccount:app.activeAccount]) {
+    if ([CCCoreData isOffline:metadata.fileID activeAccount:app.activeAccount]) {
         
-        if (metadata.cryptated) cell.favoriteImageView.image = [UIImage imageNamed:image_favoritecrypto];
-        else cell.favoriteImageView.image = [UIImage imageNamed:image_favorite];
+        if (metadata.cryptated) cell.offlineImageView.image = [UIImage imageNamed:image_offlinecrypto];
+        else cell.offlineImageView.image = [UIImage imageNamed:image_offline];
     }
     
     // ----------------------------------------------------------------------------------------------------------

+ 7 - 7
iOSClient/Main/Main.storyboard

@@ -171,10 +171,10 @@
             </objects>
             <point key="canvasLocation" x="7781" y="1209"/>
         </scene>
-        <!--Favorite-->
+        <!--Offline-->
         <scene sceneID="JPc-HC-iQ7">
             <objects>
-                <tableViewController storyboardIdentifier="CCFavoriteVC" extendedLayoutIncludesOpaqueBars="YES" id="Per-s0-P6C" customClass="CCFavorite" sceneMemberID="viewController">
+                <tableViewController storyboardIdentifier="CCOfflineVC" extendedLayoutIncludesOpaqueBars="YES" id="Per-s0-P6C" customClass="CCOffline" sceneMemberID="viewController">
                     <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="ehH-Wz-w3L">
                         <rect key="frame" x="0.0" y="64" width="375" height="603"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -459,11 +459,11 @@
             </objects>
             <point key="canvasLocation" x="5653" y="327"/>
         </scene>
-        <!--Favorite-->
+        <!--Offline-->
         <scene sceneID="YSr-JF-a0V">
             <objects>
                 <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="hwM-4d-Afb" sceneMemberID="viewController">
-                    <tabBarItem key="tabBarItem" title="Favorite" image="tabBarFavorite" id="o09-67-hwf"/>
+                    <tabBarItem key="tabBarItem" title="Offline" image="tabBarOffline" id="o09-67-hwf"/>
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="MJw-Bn-5le">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
@@ -583,7 +583,7 @@
                 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="Cc7-4O-z6Q" sceneMemberID="viewController">
                     <tabBarItem key="tabBarItem" enabled="NO" title="" id="vIy-cM-ojV"/>
                     <toolbarItems/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="jCU-so-Np6">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="jCU-so-Np6">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
@@ -600,11 +600,11 @@
     <resources>
         <image name="cryptocloud_sfondo_iPad" width="256" height="187"/>
         <image name="tabBarCryptoCloud" width="50" height="50"/>
-        <image name="tabBarFavorite" width="25" height="25"/>
+        <image name="tabBarOffline" width="25" height="25"/>
         <image name="tabBarPhotos" width="25" height="25"/>
         <image name="tabBarSettings" width="25" height="25"/>
     </resources>
     <inferredMetricsTieBreakers>
-        <segue reference="YTW-Kz-l02"/>
+        <segue reference="op6-ow-K8v"/>
     </inferredMetricsTieBreakers>
 </document>

+ 5 - 5
iOSClient/Images.xcassets/actionSheetFavorite.imageset/Contents.json → iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/Contents.json

@@ -2,18 +2,18 @@
   "images" : [
     {
       "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "actionSheetFavorite.png"
+      "filename" : "actionSheetOfflineNextcloud@1x.png",
+      "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "actionSheetFavorite@2x.png",
+      "filename" : "actionSheetOfflineNextcloud@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "actionSheetFavorite@3x.png"
+      "filename" : "actionSheetOfflineNextcloud@3x.png",
+      "scale" : "3x"
     }
   ],
   "info" : {

BIN
iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@1x.png


BIN
iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@2x.png


BIN
iOSClient/Nextcloud.xcassets/actionSheetOfflineNextcloud.imageset/actionSheetOfflineNextcloud@3x.png


BIN
iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@1x.png


BIN
iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@2x.png


BIN
iOSClient/Nextcloud.xcassets/favoriteNextcloud.imageset/favoriteNextcloud@3x.png


BIN
iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite.png


BIN
iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite@2x.png


BIN
iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/nextcloudFavorite@3x.png


+ 5 - 5
iOSClient/Nextcloud.xcassets/nextcloudFavorite.imageset/Contents.json → iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/Contents.json

@@ -2,18 +2,18 @@
   "images" : [
     {
       "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "nextcloudFavorite.png"
+      "filename" : "nextcloudOffline.png",
+      "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "nextcloudFavorite@2x.png",
+      "filename" : "nextcloudOffline@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "nextcloudFavorite@3x.png"
+      "filename" : "nextcloudOffline@3x.png",
+      "scale" : "3x"
     }
   ],
   "info" : {

BIN
iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline.png


BIN
iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline@2x.png


BIN
iOSClient/Nextcloud.xcassets/nextcloudOffline.imageset/nextcloudOffline@3x.png


+ 23 - 0
iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "offlineNextcloud@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "offlineNextcloud@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "offlineNextcloud@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@1x.png


BIN
iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@2x.png


BIN
iOSClient/Nextcloud.xcassets/offlineNextcloud.imageset/offlineNextcloud@3x.png


+ 23 - 0
iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "quickActionUploadOfflineNextcloud@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "quickActionUploadOfflineNextcloud@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "quickActionUploadOfflineNextcloud@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@1x.png


BIN
iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@2x.png


BIN
iOSClient/Nextcloud.xcassets/quickActionUploadOfflineNextcloud.imageset/quickActionUploadOfflineNextcloud@3x.png


+ 40 - 0
iOSClient/Offline/CCCellOffline.h

@@ -0,0 +1,40 @@
+//
+//  CCCellOffline.h
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 05/05/15.
+//  Copyright (c) 2014 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CCCellOffline : UITableViewCell
+
+@property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
+
+@property(nonatomic, weak) IBOutlet UILabel *labelTitle;
+@property(nonatomic, weak) IBOutlet UILabel *labelInfoFile;
+
+//Last position of the scroll of the swipe
+@property (nonatomic, assign) CGFloat lastContentOffset;
+
+//Index path of the cell swipe gesture ocured
+@property (nonatomic, strong) NSIndexPath *indexPath;
+
+@end

+ 59 - 0
iOSClient/Offline/CCCellOffline.m

@@ -0,0 +1,59 @@
+//
+//  CCCellOffline.m
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 05/05/15.
+//  Copyright (c) 2014 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#import "CCCellOffline.h"
+
+@implementation CCCellOffline
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        // Initialization code
+
+        
+    }
+    return self;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated
+{
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+///-----------------------------------
+/// @name scrollViewWillBeginDecelerating
+///-----------------------------------
+
+/**
+ * Method to initialize the position where we make the swipe in order to detect the direction
+ *
+ * @param UIScrollView -> scrollView
+ */
+- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView {
+    _lastContentOffset = scrollView.contentOffset.x;
+}
+
+@end

+ 77 - 0
iOSClient/Offline/CCCellOffline.xib

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CustomCellFileAndDirectory"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="0.0" reuseIdentifier="OfflineCell" rowHeight="60" id="2" userLabel="OfflineCell" customClass="CCCellOffline">
+            <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2" id="sQq-jC-UEV">
+                <rect key="frame" x="0.0" y="0.0" width="600" height="59.5"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNC-8X-DAC">
+                        <rect key="frame" x="56" y="11" width="536" height="16"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                        <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5">
+                        <rect key="frame" x="8" y="11" width="40" height="40"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="40" id="7r4-ao-ayY"/>
+                            <constraint firstAttribute="height" constant="40" id="cGI-9B-eWe"/>
+                        </constraints>
+                    </imageView>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH">
+                        <rect key="frame" x="37" y="39" width="15" height="15"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="15" id="O4C-De-dnI"/>
+                            <constraint firstAttribute="height" constant="15" id="bun-Ao-Ysu"/>
+                        </constraints>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" tag="102" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p7I-KN-FVZ">
+                        <rect key="frame" x="56" y="39" width="536" height="12"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                        <color key="textColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="DQR-yN-JaH" secondAttribute="trailing" constant="4" id="2xR-G4-B2S"/>
+                    <constraint firstItem="QNC-8X-DAC" firstAttribute="trailing" secondItem="sQq-jC-UEV" secondAttribute="trailingMargin" id="7zt-c0-CsI"/>
+                    <constraint firstAttribute="centerY" secondItem="5" secondAttribute="centerY" constant="-1.5" id="FQP-wg-vPF"/>
+                    <constraint firstItem="DQR-yN-JaH" firstAttribute="top" secondItem="p7I-KN-FVZ" secondAttribute="top" id="K6B-gJ-8Fp"/>
+                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="5" secondAttribute="trailing" constant="8" symbolic="YES" id="K7G-0u-f8E"/>
+                    <constraint firstItem="5" firstAttribute="bottom" secondItem="p7I-KN-FVZ" secondAttribute="bottom" id="MuE-C8-4UJ"/>
+                    <constraint firstItem="QNC-8X-DAC" firstAttribute="leading" secondItem="5" secondAttribute="trailing" constant="8" symbolic="YES" id="UYc-Al-a4h"/>
+                    <constraint firstItem="5" firstAttribute="leading" secondItem="sQq-jC-UEV" secondAttribute="leadingMargin" id="ha0-VA-fF9"/>
+                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="trailing" secondItem="sQq-jC-UEV" secondAttribute="trailingMargin" id="kaB-WS-bDl"/>
+                    <constraint firstItem="5" firstAttribute="top" secondItem="QNC-8X-DAC" secondAttribute="top" id="lyH-lh-z03"/>
+                    <constraint firstItem="5" firstAttribute="top" secondItem="sQq-jC-UEV" secondAttribute="topMargin" constant="3" id="pRH-CQ-O4x"/>
+                </constraints>
+            </tableViewCellContentView>
+            <connections>
+                <outlet property="fileImageView" destination="5" id="6"/>
+                <outlet property="labelInfoFile" destination="p7I-KN-FVZ" id="5Yb-hH-k73"/>
+                <outlet property="labelTitle" destination="QNC-8X-DAC" id="dFX-Cb-8IE"/>
+                <outlet property="statusImageView" destination="DQR-yN-JaH" id="UmC-pt-kjV"/>
+            </connections>
+            <point key="canvasLocation" x="316" y="128"/>
+        </tableViewCell>
+    </objects>
+    <simulatedMetricsContainer key="defaultSimulatedMetrics">
+        <simulatedStatusBarMetrics key="statusBar"/>
+        <simulatedOrientationMetrics key="orientation"/>
+        <simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
+    </simulatedMetricsContainer>
+</document>

+ 56 - 0
iOSClient/Offline/CCOffline.h

@@ -0,0 +1,56 @@
+//
+//  CCOffline.h
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 16/01/17.
+//  Copyright (c) 2014 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "UIScrollView+EmptyDataSet.h"
+#import "TWMessageBarManager.h"
+#import "AHKActionSheet.h"
+#import "CCCellOffline.h"
+#import "CCUtility.h"
+#import "CCCoreData.h"
+#import "CCMain.h"
+#import "CCGraphics.h"
+#import "CCAccountWeb.h"
+#import "CCBancomat.h"
+#import "CCCartaDiCredito.h"
+#import "CCCartaIdentita.h"
+#import "CCContoCorrente.h"
+#import "CCNote.h"
+#import "CCPassaporto.h"
+#import "CCPatenteGuida.h"
+
+@interface CCOffline : UITableViewController <UITableViewDataSource, UITableViewDelegate, UIDocumentInteractionControllerDelegate, UIActionSheetDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate, CCAccountWebDelegate, CCBancomatDelegate, CCCartaDiCreditoDelegate, CCCartaIdentitaDelegate, CCContoCorrenteDelegate, CCNoteDelegate, CCPassaportoDelegate, CCPatenteGuidaDelegate>
+
+@property (nonatomic, strong) CCMetadata *metadata;
+@property (nonatomic, strong) NSString *fileIDPhoto;
+@property (nonatomic, strong) NSString *directoryIDPhoto;
+@property (nonatomic, strong) NSString *serverUrlLocal;
+@property (nonatomic, strong) NSString *textView;
+
+@property (nonatomic, weak) CCDetail *detailViewController;
+@property (nonatomic, strong) UIDocumentInteractionController *docController;
+
+- (void)forcedSwitchOffline;
+
+@end

+ 692 - 0
iOSClient/Offline/CCOffline.m

@@ -0,0 +1,692 @@
+//
+//  CCOffline.m
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 16/01/17.
+//  Copyright (c) 2014 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#import "CCOffline.h"
+
+#import "AppDelegate.h"
+#import "CCSynchronization.h"
+
+#pragma GCC diagnostic ignored "-Wundeclared-selector"
+
+@interface CCOffline ()
+{
+    NSMutableArray *dataSource;
+}
+
+@end
+
+@implementation CCOffline
+
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Init =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])  {
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadTable) name:@"reloadTableCCOffline" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(synchronizedOffline) name:@"synchronizedCCOffline" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initToHome) name:@"initToHomeOffline" object:nil];
+        
+        app.activeOffline = self;
+    }
+    return self;
+}
+
+- (id)initWithStyle:(UITableViewStyle)style
+{
+    self = [super initWithStyle:style];
+    if (self) {
+        // Custom initialization
+    }
+    return self;
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== View =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)viewDidLoad
+{
+    [super viewDidLoad];
+    
+    // Custom Cell
+    [self.tableView registerNib:[UINib nibWithNibName:@"CCCellOffline" bundle:nil] forCellReuseIdentifier:@"OfflineCell"];
+        
+    // Settings initial dir
+    if (![self.serverUrlLocal length]) self.serverUrlLocal = @"Offline";
+    
+    // dataSource
+    dataSource = [[NSMutableArray alloc] init];
+    
+    // Metadata
+    self.metadata = [[CCMetadata alloc] init];
+    
+    self.tableView.emptyDataSetDelegate = self;
+    self.tableView.emptyDataSetSource = self;
+    self.tableView.tableFooterView = [UIView new];
+    
+    // button
+    UIImage *image;
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) {
+        image = [UIImage imageNamed:image_navBarLocal];
+        self.textView = NSLocalizedString(@"_offline_", nil);
+    } else image = [UIImage imageNamed:image_navBarOffline];
+    UIBarButtonItem *_btn=[[UIBarButtonItem alloc]initWithImage:image style:UIBarButtonItemStylePlain target:self action:@selector(switchOfflineLocal)];
+    self.navigationItem.rightBarButtonItem=_btn;
+    
+    [self reloadTable];
+}
+
+// Apparirà
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    // Color
+    [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar hidden:NO];
+    [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    
+    // title
+    self.title = self.textView;
+    
+    [self reloadTable];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Effetti Grafici =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)forcedSwitchOffline
+{
+     if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO)
+         [self switchOfflineLocal];
+}
+
+- (void)switchOfflineLocal
+{
+    UIImage *imageBarButton;
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) {
+        
+        self.textView = NSLocalizedString(@"_local_storage_", nil);
+        imageBarButton = [UIImage imageNamed:image_navBarOffline];
+        
+        // img Tab Bar
+        UITabBarItem *item = [self.tabBarController.tabBar.items objectAtIndex:1];
+        
+        item.selectedImage = [UIImage imageNamed:image_tabBarLocal];
+        item.image = [UIImage imageNamed:image_tabBarLocal];
+
+        self.serverUrlLocal = [CCUtility getDirectoryLocal];
+        app.isLocalStorage = true;
+        
+    } else {
+        
+        self.textView = NSLocalizedString(@"_offline_", nil);
+        imageBarButton = [UIImage imageNamed:image_navBarLocal];
+        
+        // Image Tab Bar
+        UITabBarItem *item = [self.tabBarController.tabBar.items objectAtIndex:1];
+        
+        item.selectedImage = [UIImage imageNamed:image_tabBarOffline];
+        item.image = [UIImage imageNamed:image_tabBarOffline];
+
+        self.serverUrlLocal = @"Offline";
+        app.isLocalStorage = false;
+    }
+    
+    UIBarButtonItem *_btn=[[UIBarButtonItem alloc]initWithImage:imageBarButton style:UIBarButtonItemStylePlain target:self action:@selector(switchOfflineLocal)];
+    self.navigationItem.rightBarButtonItem=_btn;
+    
+    // init of Navigation Control
+    [self.navigationController popToRootViewControllerAnimated:NO];
+    
+    // refresh
+    if ([self.serverUrlLocal isEqualToString:@"Offline"])
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"initToHomeOffline" object:nil];
+    else
+        [self reloadTable];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ==== DZNEmptyDataSetSource Methods ====
+#pragma --------------------------------------------------------------------------------------------
+
+- (BOOL)emptyDataSetShouldDisplay:(UIScrollView *)scrollView
+{
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] || [self.serverUrlLocal isEqualToString:[CCUtility getDirectoryLocal]]) return YES;
+    else return NO;
+}
+
+- (CGFloat)spaceHeightForEmptyDataSet:(UIScrollView *)scrollView
+{
+    return 0.0f;
+}
+
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView
+{
+    return - self.navigationController.navigationBar.frame.size.height;
+}
+
+- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
+{
+    return [UIColor whiteColor];
+}
+
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
+{
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) return [UIImage imageNamed:image_brandOffline];
+    else return [UIImage imageNamed:image_brandLocal];
+}
+
+- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
+{
+    NSString *text;
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) text = NSLocalizedString(@"_no_files_uploaded_", nil);
+    else text = NSLocalizedString(@"_no_files_uploaded_", nil);
+    
+    NSDictionary *attributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:20.0f], NSForegroundColorAttributeName:COLOR_BRAND};
+    
+    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
+}
+
+- (NSAttributedString *)descriptionForEmptyDataSet:(UIScrollView *)scrollView
+{
+    NSString *text;
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) text = NSLocalizedString(@"_tutorial_offline_view_", nil);
+    else text = NSLocalizedString(@"_tutorial_local_view_", nil);
+    
+    NSMutableParagraphStyle *paragraph = [NSMutableParagraphStyle new];
+    paragraph.lineBreakMode = NSLineBreakByWordWrapping;
+    paragraph.alignment = NSTextAlignmentCenter;
+    
+    NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:14.0], NSForegroundColorAttributeName: [UIColor lightGrayColor], NSParagraphStyleAttributeName: paragraph};
+    
+    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== UIDocumentInteractionControllerDelegate =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)documentInteractionControllerDidDismissOptionsMenu:(UIDocumentInteractionController *)controller
+{
+    // evitiamo il rimando della eventuale photo e/o video
+    if ([CCCoreData getCameraUploadActiveAccount:app.activeAccount]) {
+        
+        [CCCoreData setCameraUploadDatePhoto:[NSDate date]];
+        [CCCoreData setCameraUploadDateVideo:[NSDate date]];
+    }
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ==== Comandi ====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)openModel:(CCMetadata *)metadata
+{
+    UIViewController *viewController;
+    
+    if ([metadata.model isEqualToString:@"cartadicredito"])
+        viewController = [[CCCartaDiCredito alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"bancomat"])
+        viewController = [[CCBancomat alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"contocorrente"])
+        viewController = [[CCContoCorrente alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"accountweb"])
+        viewController = [[CCAccountWeb alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"patenteguida"])
+        viewController = [[CCPatenteGuida alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"cartaidentita"])
+        viewController = [[CCCartaIdentita alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"passaporto"])
+        viewController = [[CCPassaporto alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+    
+    if ([metadata.model isEqualToString:@"note"]) {
+        
+        viewController = [[CCNote alloc] initWithDelegate:self fileName:metadata.fileName uuid:metadata.uuid rev:metadata.rev fileID:metadata.fileID modelReadOnly:true isLocal:app.isLocalStorage];
+        
+        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
+        
+        [self presentViewController:navigationController animated:YES completion:nil];
+        
+    } else {
+        
+         UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
+        
+        [navigationController setModalPresentationStyle:UIModalPresentationFormSheet];
+        
+        [self presentViewController:navigationController animated:YES completion:nil];
+    }
+}
+
+- (void)openWith:(CCMetadata *)metadata
+{
+    NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%@", self.serverUrlLocal, metadata.fileNamePrint]];
+    
+    self.docController = [UIDocumentInteractionController interactionControllerWithURL:url];
+    
+    self.docController.delegate = self;
+    
+    [self.docController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Synchronized Offline =====
+#pragma---------------------------------------------------------------------------------------------
+
+- (void)readFileFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode
+{
+    // error
+}
+
+- (void)readFileSuccess:(CCMetadataNet *)metadataNet metadata:(CCMetadata *)metadata
+{
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
+        
+        [[CCSynchronization sharedSynchronization] verifyChangeMedatas:[[NSArray alloc] initWithObjects:metadata, nil] serverUrl:metadataNet.serverUrl directoryID:metadataNet.directoryID account:app.activeAccount synchronization:NO];
+    });
+    
+    [self.tableView performSelector:@selector(reloadData) withObject:nil afterDelay:0.1];
+}
+
+- (void)synchronizedOffline
+{
+    if (app.activeAccount == nil || [CCUtility getHomeServerUrlActiveUrl:app.activeUrl typeCloud:app.typeCloud] == nil) return;
+    
+    NSArray *metadatas = [[NSArray alloc] init];
+    
+    metadatas = [CCCoreData getOfflineWithControlZombie:YES activeAccount:app.activeAccount directoryUser:app.directoryUser];
+    
+    for (CCMetadata *metadata in metadatas) {
+        
+        NSString *serverUrl = [CCCoreData getServerUrlFromDirectoryID:metadata.directoryID activeAccount:app.activeAccount];
+        if (serverUrl == nil) continue;
+        
+        CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
+        
+        metadataNet.action = actionReadFile;
+        metadataNet.fileName = metadata.fileName;
+        metadataNet.fileNamePrint = metadata.fileNamePrint;
+        metadataNet.serverUrl = serverUrl;
+        metadataNet.selector = selectorReadFileOffline;
+        metadataNet.priority = NSOperationQueuePriorityVeryLow;
+        
+        [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
+    }
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Swipe Table -> menu =====
+#pragma--------------------------------------------------------------------------------------------
+
+// more
+- (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO) {
+        
+        NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];
+        NSString *cameraFolderPath = [CCCoreData getCameraUploadFolderPathActiveAccount:app.activeAccount activeUrl:app.activeUrl typeCloud:app.typeCloud];
+        
+        CCMetadata *metadata = [CCUtility insertFileSystemInMetadata:[dataSource objectAtIndex:indexPath.row] directory:self.serverUrlLocal activeAccount:app.activeAccount cameraFolderName:cameraFolderName cameraFolderPath:cameraFolderPath];
+        
+        if (metadata.directory)
+            return nil;
+        else
+            return NSLocalizedString(@"_more_", nil);
+        
+    } else return nil;
+}
+
+- (void)tableView:(UITableView *)tableView swipeAccessoryButtonPushedForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    UIImage *iconHeader;
+    
+    NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];
+    NSString *cameraFolderPath = [CCCoreData getCameraUploadFolderPathActiveAccount:app.activeAccount activeUrl:app.activeUrl typeCloud:app.typeCloud];
+
+    self.metadata = [CCUtility insertFileSystemInMetadata:[dataSource objectAtIndex:indexPath.row] directory:self.serverUrlLocal activeAccount:app.activeAccount cameraFolderName:cameraFolderName cameraFolderPath:cameraFolderPath];
+    
+    [self setEditing:NO animated:YES];
+    
+    AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithView:self.view title:nil];
+    
+    actionSheet.animationDuration = 0.2;
+    
+    actionSheet.blurRadius = 0.0f;
+    actionSheet.blurTintColor = [UIColor colorWithWhite:0.0f alpha:0.50f];
+    
+    actionSheet.buttonHeight = 50.0;
+    actionSheet.cancelButtonHeight = 50.0f;
+    actionSheet.separatorHeight = 5.0f;
+        
+    actionSheet.encryptedButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:COLOR_ENCRYPTED };
+    actionSheet.buttonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:COLOR_GRAY };
+    actionSheet.cancelButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_BRAND };
+    actionSheet.disableButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:COLOR_GRAY };
+    
+    actionSheet.separatorColor = COLOR_SEPARATOR_TABLE;
+    actionSheet.cancelButtonTitle = NSLocalizedString(@"_cancel_",nil);
+
+    // assegnamo l'immagine anteprima se esiste, altrimenti metti quella standars
+    if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.%@.ico", self.serverUrlLocal, self.metadata.fileNamePrint]])
+        iconHeader = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/.%@.ico", self.serverUrlLocal, self.metadata.fileNamePrint]];
+    else
+        iconHeader = [UIImage imageNamed:self.metadata.iconName];
+    
+    [actionSheet addButtonWithTitle: _metadata.fileNamePrint
+                              image: iconHeader
+                    backgroundColor: COLOR_NAVBAR_IOS7
+                             height: 50.0
+                               type: AHKActionSheetButtonTypeDisabled
+                            handler: nil
+    ];
+    
+    [actionSheet addButtonWithTitle: NSLocalizedString(@"_open_in_", nil)
+                              image: [UIImage imageNamed:image_actionSheetOpenIn]
+                    backgroundColor: [UIColor whiteColor]
+                             height: 50.0
+                               type: AHKActionSheetButtonTypeDefault
+                            handler: ^(AHKActionSheet *as) {
+                                [self performSelector:@selector(openWith:) withObject:self.metadata];
+                            }];
+
+    [actionSheet show];
+}
+
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    // close swip
+    [self setEditing:NO animated:YES];
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) {
+        
+        NSManagedObject *record = [dataSource objectAtIndex:indexPath.row];
+        [CCCoreData removeOfflineFromFileID:[record valueForKey:@"fileID"] activeAccount:app.activeAccount];
+    }
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO) {
+        
+        NSString *fileNamePath = [NSString stringWithFormat:@"%@/%@", self.serverUrlLocal,[dataSource objectAtIndex:indexPath.row]];
+        NSString *iconPath = [NSString stringWithFormat:@"%@/.%@.ico", self.serverUrlLocal,[dataSource objectAtIndex:indexPath.row]];
+        
+        [[NSFileManager defaultManager] removeItemAtPath:fileNamePath error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:iconPath error:nil];
+    }
+    
+    [self reloadTable];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ==== Table ====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)initToHome
+{
+    self.serverUrlLocal = @"Offline";
+    self.textView = NSLocalizedString(@"_offline_", nil);
+    
+    UIBarButtonItem *_btn=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:image_navBarLocal] style:UIBarButtonItemStylePlain target:self action:@selector(switchOfflineLocal)];
+    self.navigationItem.rightBarButtonItem=_btn;
+    
+    [self reloadTable];
+}
+
+- (void)reloadTable
+{
+    // Datasource
+    if ([self.serverUrlLocal isEqualToString:@"Offline"])
+        dataSource = (NSMutableArray *)[CCCoreData getOfflineWithControlZombie:YES activeAccount:app.activeAccount directoryUser:app.directoryUser];
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO) {
+        
+        [dataSource removeAllObjects];
+        
+        NSArray *subpaths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:self.serverUrlLocal error:nil];
+        
+        for (NSString *subpath in subpaths)
+            if (![[subpath lastPathComponent] hasPrefix:@"."]) [dataSource addObject:subpath];
+    }
+    
+    // title
+    self.title = self.textView;
+    
+    [self.tableView reloadData];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return 60;
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return [dataSource count];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    CCCellOffline *cell = (CCCellOffline *)[tableView dequeueReusableCellWithIdentifier:@"OfflineCell" forIndexPath:indexPath];
+    
+    // change color selection
+    UIView *selectionColor = [[UIView alloc] init];
+    selectionColor.backgroundColor = COLOR_SELECT_BACKGROUND;
+    cell.selectedBackgroundView = selectionColor;
+
+    // i am in Offline
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) {
+    
+        self.metadata = [dataSource objectAtIndex:indexPath.row];
+        cell.fileImageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, self.metadata.fileID]];
+    }
+    
+    // i am in local
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO) {
+        
+        NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];
+        NSString *cameraFolderPath = [CCCoreData getCameraUploadFolderPathActiveAccount:app.activeAccount activeUrl:app.activeUrl typeCloud:app.typeCloud];
+        
+        self.metadata = [CCUtility insertFileSystemInMetadata:[dataSource objectAtIndex:indexPath.row] directory:self.serverUrlLocal activeAccount:app.activeAccount cameraFolderName:cameraFolderName cameraFolderPath:cameraFolderPath];
+        
+        cell.fileImageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/.%@.ico", self.serverUrlLocal, self.metadata.fileNamePrint]];
+        
+        if (!cell.fileImageView.image) {
+                        
+            UIImage *icon = [CCGraphics createNewImageFrom:self.metadata.fileID directoryUser:self.serverUrlLocal fileNameTo:self.metadata.fileID fileNamePrint:self.metadata.fileNamePrint size:@"m" imageForUpload:NO typeFile:self.metadata.typeFile writePreview:NO optimizedFileName:[CCUtility getOptimizedPhoto]];
+            
+            if (icon) {
+                [CCGraphics saveIcoWithFileID:self.metadata.fileNamePrint image:icon writeToFile:[NSString stringWithFormat:@"%@/.%@.ico", self.serverUrlLocal, self.metadata.fileNamePrint] copy:NO move:NO fromPath:nil toPath:nil];
+                cell.fileImageView.image = icon;
+            }
+        }
+    }
+    
+    // color and font
+    if (self.metadata.cryptated) {
+        cell.labelTitle.textColor = COLOR_ENCRYPTED;
+        //nameLabel.font = RalewayLight(13.0f);
+        cell.labelInfoFile.textColor = [UIColor blackColor];
+        //detailLabel.font = RalewayLight(9.0f);
+    } else {
+        cell.labelTitle.textColor = COLOR_CLEAR;
+        //nameLabel.font = RalewayLight(13.0f);
+        cell.labelInfoFile.textColor = [UIColor blackColor];
+        //detailLabel.font = RalewayLight(9.0f);
+    }
+
+    if (self.metadata.directory) {
+        cell.labelInfoFile.text = [CCUtility dateDiff:self.metadata.date];
+        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    }
+    
+    // File name
+    cell.labelTitle.text = self.metadata.fileNamePrint;
+    cell.labelInfoFile.text = @"";
+    
+    // Immagine del file, se non c'è l'anteprima mettiamo quella standard
+    if (cell.fileImageView.image == nil)
+        cell.fileImageView.image = [UIImage imageNamed:self.metadata.iconName];
+    
+    cell.statusImageView.image = nil;
+    
+    // it's encrypted ???
+    if (self.metadata.cryptated && [self.metadata.type isEqualToString:metadataType_model] == NO)
+        cell.statusImageView.image = [UIImage imageNamed:image_lock];
+    
+    // it's in download mode
+    if ([self.metadata.session length] > 0 && [self.metadata.session rangeOfString:@"download"].location != NSNotFound)
+        cell.statusImageView.image = [UIImage imageNamed:image_attention];
+    
+    // text and length
+    if (self.metadata.directory) {
+        
+        cell.labelInfoFile.text = [CCUtility dateDiff:self.metadata.date];
+        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+        
+    } else {
+        
+        NSString *date = [CCUtility dateDiff:self.metadata.date];
+        NSString *length = [CCUtility transformedSize:self.metadata.size];
+        
+        if ([self.metadata.type isEqualToString:metadataType_model])
+            cell.labelInfoFile.text = [NSString stringWithFormat:@"%@", date];
+        
+        if ([self.metadata.type isEqualToString:metadataType_file] || [self.metadata.type isEqualToString:metadataType_local])
+            cell.labelInfoFile.text = [NSString stringWithFormat:@"%@, %@", date, length];
+        
+        cell.accessoryType = UITableViewCellAccessoryNone;
+        
+    }
+    
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    // deselect row
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+        
+    if ([self.serverUrlLocal isEqualToString:@"Offline"]) {
+        
+        NSManagedObject *record = [dataSource objectAtIndex:indexPath.row];
+        self.fileIDPhoto = [record valueForKey:@"fileID"];
+        self.directoryIDPhoto = nil;
+        self.metadata = [CCCoreData getMetadataWithPreficate:[NSPredicate predicateWithFormat:@"(fileID == %@) AND (account == %@)", self.fileIDPhoto, app.activeAccount] context:nil];
+    }
+    
+    if ([self.serverUrlLocal isEqualToString:@"Offline"] == NO) {
+        
+        NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];
+        NSString *cameraFolderPath = [CCCoreData getCameraUploadFolderPathActiveAccount:app.activeAccount activeUrl:app.activeUrl typeCloud:app.typeCloud];
+        
+        self.metadata = [CCUtility insertFileSystemInMetadata:[dataSource objectAtIndex:indexPath.row] directory:self.serverUrlLocal activeAccount:app.activeAccount cameraFolderName:cameraFolderName cameraFolderPath:cameraFolderPath];
+        self.fileIDPhoto = self.metadata.fileID;
+        self.directoryIDPhoto = self.serverUrlLocal;
+    }
+    
+    // if is in download [do not touch]
+    if ([self.metadata.session length] > 0 && [self.metadata.session rangeOfString:@"download"].location != NSNotFound) return;
+    
+    if (([self.metadata.type isEqualToString:metadataType_file] || [self.metadata.type isEqualToString:metadataType_local]) && self.metadata.directory == NO) {
+        
+        if ([self shouldPerformSegue])
+            [self performSegueWithIdentifier:@"segueDetail" sender:self];
+    }
+    
+    if ([self.metadata.type isEqualToString:metadataType_model]) [self openModel:self.metadata];
+    
+    if (self.metadata.directory) [self performSegueDirectoryWithControlPasscode];
+}
+
+-(void)performSegueDirectoryWithControlPasscode
+{
+    CCOffline *viewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"CCOfflineVC"];
+    
+    viewController.serverUrlLocal = [CCUtility stringAppendServerUrl:self.serverUrlLocal addServerUrl:self.metadata.fileName];
+    viewController.textView = self.metadata.fileName;
+
+    [self.navigationController pushViewController:viewController animated:YES];
+}
+
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Navigation ====
+#pragma --------------------------------------------------------------------------------------------
+
+- (BOOL)shouldPerformSegue
+{
+    // if i am in background -> exit
+    if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) return NO;
+    
+    // if i am not window -> exit
+    if (self.view.window == NO)
+        return NO;
+
+    // Collapsed but i am in detail -> exit
+    if (self.splitViewController.isCollapsed)
+        if (self.detailViewController.isViewLoaded && self.detailViewController.view.window) return NO;
+    
+    // Video in run -> exit
+    if (self.detailViewController.photoBrowser.currentVideoPlayerViewController.isViewLoaded && self.detailViewController.photoBrowser.currentVideoPlayerViewController.view.window) return NO;
+    
+    return YES;
+}
+
+-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
+{
+    id viewController = segue.destinationViewController;
+    
+    if ([viewController isKindOfClass:[UINavigationController class]]) {
+        UINavigationController *nav = viewController;
+        self.detailViewController = (CCDetail *)nav.topViewController;
+    } else {
+        self.detailViewController = segue.destinationViewController;
+    }
+    
+    self.detailViewController.metadataDetail = self.metadata;
+    
+    if (app.isLocalStorage) self.detailViewController.sourceDirectory = sorceDirectoryLocal;
+    else self.detailViewController.sourceDirectory = sorceDirectoryOffline;
+    
+    self.detailViewController.dateFilterQuery = nil;
+    self.detailViewController.isCameraUpload = NO;
+    
+    [self.detailViewController setTitle:self.metadata.fileNamePrint];
+}
+
+@end

+ 5 - 5
iOSClient/Settings/CCSettings.m

@@ -265,11 +265,11 @@
     row.action.formSelector = @selector(copyDirGroupToLocal:);
     [section addFormRow:row];
 
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"quickActionFavorite" rowType:XLFormRowDescriptorTypeButton title:@"Quick Action Favorite"];
+    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"quickActionOffline" rowType:XLFormRowDescriptorTypeButton title:@"Quick Action Offline"];
     [row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [row.cellConfig setObject:[UIImage imageNamed:image_settingsAdmin] forKey:@"imageView.image"];
-    row.action.formSelector = @selector(quickActionFavorite:);
+    row.action.formSelector = @selector(quickActionOffline:);
     [section addFormRow:row];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"quickActionPhotos" rowType:XLFormRowDescriptorTypeButton title:@"Quick Action Photos"];
@@ -363,13 +363,13 @@
     exit(0);
 }
 
-- (void)quickActionFavorite:(XLFormRowDescriptor *)sender
+- (void)quickActionOffline:(XLFormRowDescriptor *)sender
 {
     NSString *bundleId = [NSBundle mainBundle].bundleIdentifier;
     
-    UIApplicationShortcutItem *shortcutFavorite = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.favorite", bundleId] localizedTitle:@"" localizedSubtitle:nil icon:nil userInfo:nil];
+    UIApplicationShortcutItem *shortcutOffline = [[UIApplicationShortcutItem alloc] initWithType:[NSString stringWithFormat:@"%@.offline", bundleId] localizedTitle:@"" localizedSubtitle:nil icon:nil userInfo:nil];
     
-    [app handleShortCutItem:shortcutFavorite];
+    [app handleShortCutItem:shortcutOffline];
 }
 
 - (void)quickActionPhotos:(XLFormRowDescriptor *)sender

+ 4 - 4
iOSClient/Synchronization/CCSynchronization.m

@@ -298,11 +298,11 @@
             NSString *selector, *selectorPost;
             BOOL downloadData, downloadPlist;
         
-            // it's a favorite ?
-            BOOL isFavorite = [CCCoreData isFavorite:metadata.fileID activeAccount:app.activeAccount];
+            // it's a offline ?
+            BOOL isOffline = [CCCoreData isOffline:metadata.fileID activeAccount:app.activeAccount];
         
-            if (isFavorite)
-                selectorPost = selectorAddFavorite;
+            if (isOffline)
+                selectorPost = selectorAddOffline;
         
             if ([metadata.type isEqualToString:metadataType_file]) {
                 downloadData = YES;

+ 1 - 1
iOSClient/cryptocloud.xcdatamodeld/.xccurrentversion

@@ -3,6 +3,6 @@
 <plist version="1.0">
 <dict>
 	<key>_XCCurrentVersionName</key>
-	<string>cryptocloud 5.xcdatamodel</string>
+	<string>cryptocloud 7.xcdatamodel</string>
 </dict>
 </plist>

+ 135 - 0
iOSClient/cryptocloud.xcdatamodeld/cryptocloud 6.xcdatamodel/contents

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16C67" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="cryptocloud">
+    <entity name="TableAccount" representedClassName="TableAccount" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="active" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUpload" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadBackground" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCreateSubfolder" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDatePhoto" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDateVideo" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadFolderName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFolderPath" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFull" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadSaveAlbum" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="optimization" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="password" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="token" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uid" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="url" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="user" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableAutomaticUpload" representedClassName="TableAutomaticUpload" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="assetLocalItentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="priority" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="selector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="selectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableCertificates" representedClassName="TableCertificates" syncable="YES">
+        <attribute name="certificateLocation" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableDirectory" representedClassName="TableDirectory" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateReadDirectory" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="lock" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="synchronized" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableGPS" representedClassName="TableGPS" syncable="YES">
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="latitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="location" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="longitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkAdministrativeArea" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkCountry" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkLocality" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkPostalCode" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkThoroughfare" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableLocalFile" representedClassName="TableLocalFile" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifLatitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="exifLongitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="offline" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableMetadata" representedClassName="TableMetadata" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cryptated" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directory" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="errorPasscode" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNameData" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="iconName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="localIdentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="model" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="nameCurrentDevice" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="protocol" optional="YES" attributeType="String" defaultValueString="1" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionError" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionTaskIdentifier" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="sessionTaskIdentifierPlist" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="thumbnailExists" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="type" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeFile" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableShare" representedClassName="TableShare" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareLink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareUserAndGroup" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <elements>
+        <element name="TableAccount" positionX="-6174" positionY="153" width="171" height="420"/>
+        <element name="TableAutomaticUpload" positionX="-5967" positionY="306" width="128" height="180"/>
+        <element name="TableCertificates" positionX="-5976" positionY="297" width="128" height="75"/>
+        <element name="TableDirectory" positionX="-5465" positionY="426" width="128" height="210"/>
+        <element name="TableGPS" positionX="-5609" positionY="243" width="128" height="180"/>
+        <element name="TableLocalFile" positionX="-5472" positionY="153" width="135" height="225"/>
+        <element name="TableMetadata" positionX="-5949" positionY="162" width="162" height="525"/>
+        <element name="TableShare" positionX="-5976" positionY="297" width="128" height="135"/>
+    </elements>
+</model>

+ 135 - 0
iOSClient/cryptocloud.xcdatamodeld/cryptocloud 7.xcdatamodel/contents

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16C67" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="cryptocloud">
+    <entity name="TableAccount" representedClassName="TableAccount" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="active" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUpload" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadBackground" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCreateSubfolder" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDatePhoto" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDateVideo" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadFolderName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFolderPath" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFull" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadSaveAlbum" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="optimization" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="password" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="token" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uid" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="url" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="user" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableAutomaticUpload" representedClassName="TableAutomaticUpload" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="assetLocalItentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="priority" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="selector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="selectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableCertificates" representedClassName="TableCertificates" syncable="YES">
+        <attribute name="certificateLocation" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableDirectory" representedClassName="TableDirectory" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateReadDirectory" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="lock" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="synchronized" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableGPS" representedClassName="TableGPS" syncable="YES">
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="latitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="location" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="longitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkAdministrativeArea" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkCountry" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkLocality" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkPostalCode" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkThoroughfare" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableLocalFile" representedClassName="TableLocalFile" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifLatitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="exifLongitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="offline" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableMetadata" representedClassName="TableMetadata" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cryptated" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directory" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="errorPasscode" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNameData" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="iconName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="localIdentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="model" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="nameCurrentDevice" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="protocol" optional="YES" attributeType="String" defaultValueString="1" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionError" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionTaskIdentifier" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="sessionTaskIdentifierPlist" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="thumbnailExists" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="type" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeFile" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableShare" representedClassName="TableShare" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareLink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareUserAndGroup" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <elements>
+        <element name="TableAccount" positionX="-6174" positionY="153" width="171" height="420"/>
+        <element name="TableAutomaticUpload" positionX="-5967" positionY="306" width="128" height="180"/>
+        <element name="TableCertificates" positionX="-5976" positionY="297" width="128" height="75"/>
+        <element name="TableDirectory" positionX="-5465" positionY="426" width="128" height="210"/>
+        <element name="TableGPS" positionX="-5609" positionY="243" width="128" height="180"/>
+        <element name="TableLocalFile" positionX="-5472" positionY="153" width="135" height="225"/>
+        <element name="TableMetadata" positionX="-5949" positionY="162" width="162" height="525"/>
+        <element name="TableShare" positionX="-5976" positionY="297" width="128" height="135"/>
+    </elements>
+</model>

+ 2 - 2
iOSClient/en.lproj/Intro.strings

@@ -17,8 +17,8 @@
 "_intro_06_Nextcloud_" = "Afterwards, you can create your own account by entering the requested data.";
 "_intro_07_" = "_brand_";
 "_intro_08_" = "From now on, you will be able to see all the files stored in your Cloud. You will be able to rename, move, delete them, send them to other compatible programs installed in your iPhone, and much more.";
-"_intro_09_" = "FAVORITES & LOCAL STORAGE";
-"_intro_10_" = "You can tag the most important files as 'Favorites', so that they are copied and will always remain synchronized on your iPhone and they can be consulted offline. In the 'Local storage' instead enter files that are no longer synchronized. In the 'Local storage' they will be decompress the compressed files you download from the cloud where you can also access it via iTunes.";
+"_intro_09_" = "OFFLINE & LOCAL STORAGE";
+"_intro_10_" = "You can tag the most important files as 'Offline', so that they are copied and will always remain synchronized on your iPhone and they can be consulted offline. In the 'Local storage' instead enter files that are no longer synchronized. In the 'Local storage' they will be decompress the compressed files you download from the cloud where you can also access it via iTunes.";
 "_intro_11_" = "ENCRYPT / DECRYPT";
 "_intro_12_" = "Any file can be encrypted or decrypted. The name of folders containing your files can be encrypted as well (so as to hide any possible hint at their contents).";
 "_intro_13_" = "ADD";

+ 6 - 2
iOSClient/en.lproj/Localizable.strings

@@ -95,7 +95,7 @@
 "_want_exit_"               = "Attention! _brand_ will be reset to the initial state. Continue?";
 "_proceed_"                 = "Proceed";
 "_delete_cache_"            = "Delete cache";
-"_want_delete_cache_"       = "Do you want to delete cache (will also delete all local files and reset the favorite)?";
+"_want_delete_cache_"       = "Do you want to delete cache (will also delete all local files and reset the file offline)?";
 "_mail_deleted_"            = "Email deleted";
 "_mail_saved_"              = "Email saved";
 "_mail_sent_"               = "Email sent successfully";
@@ -196,12 +196,14 @@
 "_email_"                       = "Email";
 "_title_form_security_init_"    = "Security options";
 
-// Favorite
+// offline
 
 "_favorites_"                   = "Favorites";
+"_offline_"                     = "Offline";
 "_local_storage_"               = "Local storage";
 "_no_files_uploaded_"           = "No files uploaded";
 "_tutorial_favorite_view_"      = "Copy here the files that should be available offline. They will be synchronized with your cloud.";
+"_tutorial_offline_view_"       = "Copy here the files that should be available offline. They will be synchronized with your cloud.";
 "_tutorial_local_view_"         = "Copy here the files you want to have available offline, but that will no longer be synchronized with your cloud. \n\n You'll find the unpacked files from your cloud. \n\n Connect to iTunes to share these files.";
 "_more_"                        = "More";
 
@@ -315,7 +317,9 @@
 "_encrypt_"                     = "Encrypt";
 "_decrypt_"                     = "Decrypt";
 "_remove_favorites_"            = "Remove from favorites";
+"_remove_offline_"              = "Remove from offline";
 "_add_favorites_"               = "Add to favorites";
+"_add_offline_"                 = "Add to offline";
 "_remove_passcode_"             = "Remove password protection";
 "_protect_passcode_"            = "Protect with password";
 "_share_"                       = "Share";