marinofaggiana 5 жил өмнө
parent
commit
22fd52b5ad

+ 1 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -1582,7 +1582,6 @@
 				F78ACD5921904E460088454D /* ActionSheetHeaderView */,
 				F7DFB7E9219C5A0500680748 /* Create cloud */,
 				F70211FA1BAC56E9003FC03E /* CCMain.h */,
-				F7682FDF23C36B0500983A04 /* NCMainTabBar.swift */,
 				F70211FB1BAC56E9003FC03E /* CCMain.m */,
 				F7226EDB1EE4089300EBECB1 /* Main.storyboard */,
 				F7D0E65E1BC5042E008D989A /* CCDetail.h */,
@@ -1591,6 +1590,7 @@
 				F78F6FAF1CC8CCB700F4EA25 /* CCSection.m */,
 				F792A77B1BC7C45400C9388E /* CCSplit.h */,
 				F792A77C1BC7C45400C9388E /* CCSplit.m */,
+				F7682FDF23C36B0500983A04 /* NCMainTabBar.swift */,
 				F7D6650620FF341600BFBA9E /* NCMainCommon.swift */,
 				F7F4B1D723C74B3E00D82A6E /* NCMainChangeHeightWebView.swift */,
 				F73F537E1E929C8500F8678D /* CCMore.swift */,

+ 18 - 10
iOSClient/Main/CCMain.m

@@ -190,6 +190,9 @@
     if (self.searchController.isActive == false) {
         [self queryDatasourceWithReloadData:YES serverUrl:self.serverUrl];
     }
+    
+    // Section Web View
+    [self settingsSectionWebView];
 }
 
 - (void)viewDidAppear:(BOOL)animated
@@ -310,6 +313,19 @@
     [self tableViewReloadData];
 }
 
+- (void)settingsSectionWebView
+{
+    // Nextcloud 18
+    tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilitesWithAccount:appDelegate.activeAccount];
+    if (capabilities.versionMajor >= k_nextcloud_version_18_0) {
+        self.viewSectionWebViewHeight.constant = CCUtility.getViewSectionWebViewHeight;
+        [self.mainChangeHeightWebView setHidden:false];
+    } else {
+        self.viewSectionWebViewHeight.constant = 10;
+        [self.mainChangeHeightWebView setHidden:true];
+    }
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Initialization =====
 #pragma --------------------------------------------------------------------------------------------
@@ -349,16 +365,8 @@
         // Setting Theming
         [appDelegate settingThemingColorBrand];
         
-        // Nextcloud 18
-        tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilitesWithAccount:appDelegate.activeAccount];
-        if (capabilities.versionMajor >= k_nextcloud_version_18_0) {
-            self.viewSectionWebViewHeight.constant = CCUtility.getViewSectionWebViewHeight;
-            [self.mainChangeHeightWebView setHidden:false];
-        } else {
-            [CCUtility setViewSectionWebViewHeight:10];
-            self.viewSectionWebViewHeight.constant = 10;
-            [self.mainChangeHeightWebView setHidden:true];
-        }
+        // Section Web View
+        [self settingsSectionWebView];
         
         // Detail
         // If AVPlayer in play -> Stop

+ 1 - 1
iOSClient/Main/Main.storyboard

@@ -453,7 +453,7 @@
                                                 </constraints>
                                             </imageView>
                                         </subviews>
-                                        <color key="backgroundColor" systemColor="systemGreenColor" red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="10" id="5nD-75-8Rl"/>
                                             <constraint firstItem="6qg-mV-HhN" firstAttribute="centerY" secondItem="ucy-1e-ZKf" secondAttribute="centerY" id="bwH-hl-4Vr"/>

+ 5 - 4
iOSClient/Main/NCMainChangeHeightWebView.swift

@@ -21,12 +21,10 @@ class NCMainChangeHeightWebView: UIView {
     required init?(coder: NSCoder) {
         super.init(coder: coder)
         
-        self.backgroundColor = NCBrandColor.sharedInstance.brand
         NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
     }
     
     @objc func changeTheming() {
-        self.backgroundColor = NCBrandColor.sharedInstance.brand
         imageDrag.image = CCGraphics.changeThemingColorImage(UIImage(named: "dragHorizontal"), width: 20, height: 10, color: NCBrandColor.sharedInstance.brandText)
     }
     
@@ -40,8 +38,7 @@ class NCMainChangeHeightWebView: UIView {
         let touch = touches.first
         let endPosition = touch?.location(in: self)
         let difference = endPosition!.y - startPosition!.y
-        let currentviewSectionWebViewHeight = appDelegate.activeMain.viewSectionWebViewHeight.constant
-        let differenceSectionWebViewHeight = currentviewSectionWebViewHeight + difference
+        let differenceSectionWebViewHeight = appDelegate.activeMain.viewSectionWebViewHeight.constant + difference
         
         if differenceSectionWebViewHeight <= minHeight {
             appDelegate.activeMain.viewSectionWebViewHeight.constant = minHeight
@@ -52,6 +49,10 @@ class NCMainChangeHeightWebView: UIView {
         else {
             appDelegate.activeMain.viewSectionWebViewHeight.constant = differenceSectionWebViewHeight
         }
+        
+        // save position
+        let currentviewSectionWebViewHeight = Int(appDelegate.activeMain.viewSectionWebViewHeight.constant)
+        CCUtility.setViewSectionWebViewHeight(currentviewSectionWebViewHeight)
     }