Browse Source

Move Notification view in "More"

marinofaggiana 4 years ago
parent
commit
45e0f8ea84

+ 4 - 0
iOSClient/Main/CCMain.m

@@ -741,6 +741,7 @@
     [self SetSortButtonText];
 }
 
+/*
 - (UIImage *)getImageLogoHome
 {
     UIImage *image = [UIImage imageNamed:@"themingLogo"];
@@ -765,6 +766,7 @@
         return image;
     }
 }
+*/
 
 - (void)setUINavigationBarDefault
 {
@@ -1006,6 +1008,7 @@
     [self tableViewSelect:false];
 }
 
+/*
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ==== View Notification  ====
 #pragma --------------------------------------------------------------------------------------------
@@ -1021,6 +1024,7 @@
         [self presentViewController:notificationVC animated:YES completion:nil];
     }
 }
+*/
 
 #pragma mark -
 #pragma --------------------------------------------------------------------------------------------

+ 7 - 0
iOSClient/Main/CCMore.swift

@@ -97,6 +97,13 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         item.url = "segueTransfers"
         functionMenu.append(item)
         
+        // ITEM : Notification
+        item = OCExternalSites.init()
+        item.name = "_notification_"
+        item.icon = "notification"
+        item.url = "segueNotification"
+        functionMenu.append(item)
+        
         // ITEM : Activity
         item = OCExternalSites.init()
         item.name = "_activity_"

+ 17 - 6
iOSClient/Main/Main.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="4IE-mo-rkp">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="4IE-mo-rkp">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -329,6 +329,7 @@
                         <segue destination="biz-Qc-WHi" kind="show" identifier="segueOffline" id="Pdi-HO-f4O"/>
                         <segue destination="Frr-j9-xav" kind="relationship" relationship="rootViewController" id="1rp-YB-fT4"/>
                         <segue destination="2JP-H5-EI3" kind="show" identifier="segueActivity" id="aVb-Aj-gSf"/>
+                        <segue destination="yit-8P-Oea" kind="show" identifier="segueNotification" id="JSA-8l-ixD"/>
                     </connections>
                 </navigationController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="D7n-Z1-9wU" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -363,7 +364,17 @@
                 </viewControllerPlaceholder>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="rXq-Ww-4Zx" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="10879" y="424"/>
+            <point key="canvasLocation" x="10878" y="425"/>
+        </scene>
+        <!--CCNotification.storyboard-->
+        <scene sceneID="1sy-aN-34T">
+            <objects>
+                <viewControllerPlaceholder storyboardName="CCNotification" referencedIdentifier="CCNotification.storyboard" id="yit-8P-Oea" sceneMemberID="viewController">
+                    <navigationItem key="navigationItem" id="avL-mw-LlT"/>
+                </viewControllerPlaceholder>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="EoH-78-6Yh" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="10896" y="516"/>
         </scene>
         <!--Transfers-->
         <scene sceneID="UaS-db-kwR">
@@ -644,13 +655,13 @@
             <point key="canvasLocation" x="5670" y="-709"/>
         </scene>
     </scenes>
+    <inferredMetricsTieBreakers>
+        <segue reference="2Qm-A6-CfB"/>
+    </inferredMetricsTieBreakers>
     <resources>
         <image name="avatar" width="25" height="25"/>
         <image name="disclosureIndicator" width="26" height="28"/>
         <image name="logo" width="223" height="157.5"/>
         <image name="tabBarPlus" width="80" height="80"/>
     </resources>
-    <inferredMetricsTieBreakers>
-        <segue reference="2Qm-A6-CfB"/>
-    </inferredMetricsTieBreakers>
 </document>

+ 3 - 21
iOSClient/Notification/CCNotification.storyboard

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="eRR-MW-ghy">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="c26-Us-IIn">
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--Notification-->
         <scene sceneID="dZP-R1-zZF">
             <objects>
-                <tableViewController id="c26-Us-IIn" customClass="CCNotification" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
+                <tableViewController storyboardIdentifier="CCNotification.storyboard" id="c26-Us-IIn" customClass="CCNotification" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="187" sectionHeaderHeight="28" sectionFooterHeight="28" id="vzh-aE-2MF">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -159,24 +159,6 @@
             </objects>
             <point key="canvasLocation" x="608.79999999999995" y="162.3688155922039"/>
         </scene>
-        <!--Navigation Controller-->
-        <scene sceneID="OKW-Am-E10">
-            <objects>
-                <navigationController storyboardIdentifier="CCNotification" automaticallyAdjustsScrollViewInsets="NO" id="eRR-MW-ghy" sceneMemberID="viewController">
-                    <toolbarItems/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="jDh-Ju-bUL">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </navigationBar>
-                    <nil name="viewControllers"/>
-                    <connections>
-                        <segue destination="c26-Us-IIn" kind="relationship" relationship="rootViewController" id="q89-G9-gqj"/>
-                    </connections>
-                </navigationController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="BJ2-Ut-5Uk" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-303.19999999999999" y="167.76611694152925"/>
-        </scene>
     </scenes>
     <resources>
         <image name="avatar" width="25" height="25"/>

+ 5 - 7
iOSClient/Notification/CCNotification.swift

@@ -29,12 +29,10 @@ class CCNotification: UITableViewController, CCNotificationCelllDelegate {
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     
     override func viewDidLoad() {
-        
         super.viewDidLoad()
         
-        self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_notification_", comment: "")
-        self.navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(viewClose)), animated: true)
-        
+        self.title = NSLocalizedString("_notification_", comment: "")
+                
         self.tableView.tableFooterView = UIView()
         self.tableView.rowHeight = UITableView.automaticDimension
         self.tableView.estimatedRowHeight = 50.0
@@ -50,9 +48,9 @@ class CCNotification: UITableViewController, CCNotificationCelllDelegate {
         reloadDatasource()
     }
     
-     @objc func changeTheming() {
-           appDelegate.changeTheming(self, tableView: tableView, collectionView: nil, form: true)
-       }
+    @objc func changeTheming() {
+        appDelegate.changeTheming(self, tableView: tableView, collectionView: nil, form: false)
+    }
 
     @objc func viewClose() {