diff options
author | Marino Faggiana <ios@nextcloud.com> | 2022-09-26 11:01:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 11:01:25 +0300 |
commit | cb7acec51285a1fdd368851a3c6b96cccb45b61f (patch) | |
tree | c4c697672815603464832fb000c8d6e96f5cbd2f | |
parent | e6f0f958c1b05d882de57082f4324d1ae286fcd1 (diff) | |
parent | 3bf26ef62373ee3a755dea0b967f745015076839 (diff) |
Merge pull request #2169 from nextcloud/GUI
GUI
-rw-r--r-- | Nextcloud.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | iOSClient/Activity/NCActivity.swift | 4 | ||||
-rw-r--r-- | iOSClient/Extensions/UINavigationController+Extension.swift | 47 | ||||
-rw-r--r-- | iOSClient/Favorites/NCFavorite.swift | 6 | ||||
-rw-r--r-- | iOSClient/Files/NCFiles.swift | 2 | ||||
-rw-r--r-- | iOSClient/Main/Collection Common/NCCollectionViewCommon.swift | 2 | ||||
-rw-r--r-- | iOSClient/Main/Main.storyboard | 26 | ||||
-rw-r--r-- | iOSClient/Main/NCMainNavigationController.swift | 49 | ||||
-rw-r--r-- | iOSClient/Media/NCMedia.swift | 7 | ||||
-rw-r--r-- | iOSClient/More/NCMore.swift | 13 | ||||
-rw-r--r-- | iOSClient/Notification/NCNotification.swift | 3 | ||||
-rw-r--r-- | iOSClient/Offline/NCOffline.swift | 6 | ||||
-rw-r--r-- | iOSClient/Recent/NCRecent.swift | 6 | ||||
-rw-r--r-- | iOSClient/Shares/NCShares.swift | 6 | ||||
-rw-r--r-- | iOSClient/Transfers/NCTransfers.swift | 6 | ||||
-rw-r--r-- | iOSClient/Trash/NCTrash.swift | 3 |
16 files changed, 111 insertions, 79 deletions
diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 045ae049a..35f744720 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -155,7 +155,6 @@ F7245927289BB59300474787 /* ThreadSafeDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7245923289BB50B00474787 /* ThreadSafeDictionary.swift */; }; F72685E727C78E490019EF5E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F72685E927C78E490019EF5E /* InfoPlist.strings */; }; F726EEEC1FED1C820030B9C8 /* NCEndToEndInitialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = F726EEEB1FED1C820030B9C8 /* NCEndToEndInitialize.swift */; }; - F72928A0253B0937009CA4FD /* NCMainNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F729289F253B0937009CA4FD /* NCMainNavigationController.swift */; }; F72A17D828B221E300F3F159 /* DashboardWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72A17D728B221E300F3F159 /* DashboardWidgetView.swift */; }; F72A47EC2487B06B005AD489 /* NCOperationQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72A47EB2487B06B005AD489 /* NCOperationQueue.swift */; }; F72AD70D28C24B93006CB92D /* NextcloudKit in Frameworks */ = {isa = PBXBuildFile; productRef = F72AD70C28C24B93006CB92D /* NextcloudKit */; }; @@ -720,7 +719,6 @@ F726EEEB1FED1C820030B9C8 /* NCEndToEndInitialize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCEndToEndInitialize.swift; sourceTree = "<group>"; }; F728B2BB23E83AD200E12DA0 /* Notification_Service_Extension.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Notification_Service_Extension.plist; sourceTree = "<group>"; }; F728B2BC23E83AD200E12DA0 /* Notification_Service_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Notification_Service_Extension.entitlements; sourceTree = "<group>"; }; - F729289F253B0937009CA4FD /* NCMainNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMainNavigationController.swift; sourceTree = "<group>"; }; F72A17D728B221E300F3F159 /* DashboardWidgetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DashboardWidgetView.swift; sourceTree = "<group>"; }; F72A47EB2487B06B005AD489 /* NCOperationQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCOperationQueue.swift; sourceTree = "<group>"; }; F72CD63925C19EBF00F46F9A /* NCAutoUpload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCAutoUpload.swift; sourceTree = "<group>"; }; @@ -1256,7 +1254,6 @@ 370D26AE248A3D7A00121797 /* NCCellProtocol.swift */, F7226EDB1EE4089300EBECB1 /* Main.storyboard */, F7682FDF23C36B0500983A04 /* NCMainTabBar.swift */, - F729289F253B0937009CA4FD /* NCMainNavigationController.swift */, F75B0ABC244C4DBB00E58DCA /* NCFunctionCenter.swift */, F77444F7222816D5000D5EB0 /* NCPickerViewController.swift */, ); @@ -2852,7 +2849,6 @@ F710D2022405826100A6033D /* NCViewer+Menu.swift in Sources */, F77A697D250A0FBC00FF1708 /* NCCollectionViewCommon+Menu.swift in Sources */, AF7E504E27A2D8FF00B5E4AF /* UIBarButton+Extension.swift in Sources */, - F72928A0253B0937009CA4FD /* NCMainNavigationController.swift in Sources */, F704B5E92430C0B800632F5F /* NCCreateFormUploadConflictCell.swift in Sources */, F72D404923D2082500A97FD0 /* NCViewerNextcloudText.swift in Sources */, AFCE353927E5DE0500FEA6C2 /* NCShare+Helper.swift in Sources */, diff --git a/iOSClient/Activity/NCActivity.swift b/iOSClient/Activity/NCActivity.swift index 85a1469c0..49c779095 100644 --- a/iOSClient/Activity/NCActivity.swift +++ b/iOSClient/Activity/NCActivity.swift @@ -96,7 +96,11 @@ class NCActivity: UIViewController, NCSharePagingContent { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + appDelegate.activeViewController = self + + navigationController?.setFileAppreance() + NotificationCenter.default.addObserver(self, selector: #selector(initialize), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitialize), object: nil) initialize() } diff --git a/iOSClient/Extensions/UINavigationController+Extension.swift b/iOSClient/Extensions/UINavigationController+Extension.swift index e0e987df6..5d0fd79ca 100644 --- a/iOSClient/Extensions/UINavigationController+Extension.swift +++ b/iOSClient/Extensions/UINavigationController+Extension.swift @@ -29,4 +29,51 @@ extension UINavigationController { override func topMostViewController() -> UIViewController { return self.visibleViewController!.topMostViewController() } + + func setFileAppreance() { + + navigationBar.tintColor = .systemBlue + + let standardAppearance = UINavigationBarAppearance() + standardAppearance.configureWithDefaultBackground() + + standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] + standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] + standardAppearance.backgroundColor = .systemGray6 + navigationBar.standardAppearance = standardAppearance + + let scrollEdgeAppearance = UINavigationBarAppearance() + scrollEdgeAppearance.configureWithDefaultBackground() + + scrollEdgeAppearance.backgroundColor = .systemBackground + scrollEdgeAppearance.shadowColor = .clear + scrollEdgeAppearance.shadowImage = UIImage() + navigationBar.scrollEdgeAppearance = scrollEdgeAppearance + } + + func setGroupeAppreance() { + + navigationBar.tintColor = .systemBlue + + let standardAppearance = UINavigationBarAppearance() + standardAppearance.configureWithDefaultBackground() + + standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] + standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] + standardAppearance.backgroundColor = .systemGray6 + navigationBar.standardAppearance = standardAppearance + + let scrollEdgeAppearance = UINavigationBarAppearance() + scrollEdgeAppearance.configureWithDefaultBackground() + + scrollEdgeAppearance.backgroundColor = .systemGroupedBackground + scrollEdgeAppearance.shadowColor = .clear + scrollEdgeAppearance.shadowImage = UIImage() + navigationBar.scrollEdgeAppearance = scrollEdgeAppearance + } + + func setMediaAppreance() { + + setNavigationBarHidden(true, animated: false) + } } diff --git a/iOSClient/Favorites/NCFavorite.swift b/iOSClient/Favorites/NCFavorite.swift index 6425e9d16..d6f2d3894 100644 --- a/iOSClient/Favorites/NCFavorite.swift +++ b/iOSClient/Favorites/NCFavorite.swift @@ -42,6 +42,12 @@ class NCFavorite: NCCollectionViewCommon { emptyDescription = "_tutorial_favorite_view_" } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setFileAppreance() + } + // MARK: - DataSource + NC Endpoint override func reloadDataSource(forced: Bool = true) { diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index e84827234..15cadb930 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -52,6 +52,8 @@ class NCFiles: NCCollectionViewCommon { titleCurrentFolder = getNavigationTitle() } super.viewWillAppear(animated) + + navigationController?.setFileAppreance() } override func viewWillDisappear(_ animated: Bool) { diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index 63eaf4bd8..d06aa0355 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -103,7 +103,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS searchController?.searchBar.delegate = self searchController?.searchBar.autocapitalizationType = .none navigationItem.searchController = searchController - navigationItem.hidesSearchBarWhenScrolling = false + navigationItem.hidesSearchBarWhenScrolling = true } // Cell diff --git a/iOSClient/Main/Main.storyboard b/iOSClient/Main/Main.storyboard index 5ba228a39..198b9154f 100644 --- a/iOSClient/Main/Main.storyboard +++ b/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="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="FkP-Lh-8zt"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="FkP-Lh-8zt"> <device id="retina6_1" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -45,11 +45,11 @@ <!--File--> <scene sceneID="dMv-43-hWy"> <objects> - <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="bSZ-tE-FEj" customClass="NCMainNavigationController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController"> + <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="bSZ-tE-FEj" sceneMemberID="viewController"> <tabBarItem key="tabBarItem" title="File" id="Zxv-aS-HGF"/> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" largeTitles="YES" id="cj6-rT-wnB"> - <rect key="frame" x="0.0" y="44" width="414" height="96"/> + <rect key="frame" x="0.0" y="48" width="414" height="96"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <nil name="viewControllers"/> @@ -64,11 +64,11 @@ <!--Favorites--> <scene sceneID="YSr-JF-a0V"> <objects> - <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="hwM-4d-Afb" customClass="NCMainNavigationController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController"> + <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="hwM-4d-Afb" sceneMemberID="viewController"> <tabBarItem key="tabBarItem" title="Favorites" id="o09-67-hwf"/> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" largeTitles="YES" id="MJw-Bn-5le"> - <rect key="frame" x="0.0" y="44" width="414" height="96"/> + <rect key="frame" x="0.0" y="48" width="414" height="96"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <nil name="viewControllers"/> @@ -83,11 +83,11 @@ <!--Media--> <scene sceneID="IuY-Iu-oAm"> <objects> - <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="Npr-vu-PSD" customClass="NCMainNavigationController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController"> + <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="Npr-vu-PSD" sceneMemberID="viewController"> <tabBarItem key="tabBarItem" title="Media" id="5cw-bP-7It"/> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" largeTitles="YES" id="ixg-Pw-TNO"> - <rect key="frame" x="0.0" y="44" width="414" height="96"/> + <rect key="frame" x="0.0" y="48" width="414" height="96"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <nil name="viewControllers"/> @@ -99,14 +99,14 @@ </objects> <point key="canvasLocation" x="7771" y="327"/> </scene> - <!--Main Navigation Controller--> + <!--Navigation Controller--> <scene sceneID="cip-AF-Ks2"> <objects> - <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="Cc7-4O-z6Q" customClass="NCMainNavigationController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController"> + <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="Cc7-4O-z6Q" sceneMemberID="viewController"> <tabBarItem key="tabBarItem" enabled="NO" title="" image="tabBarPlus" id="vIy-cM-ojV"/> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" largeTitles="YES" id="jCU-so-Np6"> - <rect key="frame" x="0.0" y="44" width="414" height="96"/> + <rect key="frame" x="0.0" y="48" width="414" height="96"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <nil name="viewControllers"/> @@ -118,11 +118,11 @@ <!--More--> <scene sceneID="4RE-f1-SKU"> <objects> - <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="1Z8-Bx-Dqo" customClass="NCMainNavigationController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController"> + <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="1Z8-Bx-Dqo" sceneMemberID="viewController"> <tabBarItem key="tabBarItem" title="More" id="U4f-qS-cgh"/> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" largeTitles="YES" id="yVo-p8-ApS"> - <rect key="frame" x="0.0" y="44" width="414" height="96"/> + <rect key="frame" x="0.0" y="48" width="414" height="96"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <nil name="viewControllers"/> diff --git a/iOSClient/Main/NCMainNavigationController.swift b/iOSClient/Main/NCMainNavigationController.swift deleted file mode 100644 index c234b45d3..000000000 --- a/iOSClient/Main/NCMainNavigationController.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// NCMainNavigationController.swift -// Nextcloud -// -// Created by Marino Faggiana on 17/10/2020. -// Copyright © 2020 Marino Faggiana. All rights reserved. -// -// Author Marino Faggiana <marino.faggiana@nextcloud.com> -// -// 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 - -class NCMainNavigationController: UINavigationController { - - // MARK: - View Life Cycle - - required init?(coder: NSCoder) { - super.init(coder: coder) - - let appearance = UINavigationBarAppearance() - - appearance.configureWithOpaqueBackground() - appearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] - appearance.backgroundColor = .systemBackground - appearance.configureWithOpaqueBackground() - appearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label] - appearance.backgroundColor = .systemBackground - - appearance.shadowColor = .clear - appearance.shadowImage = UIImage() - - navigationBar.scrollEdgeAppearance = appearance - navigationBar.standardAppearance = appearance - navigationBar.tintColor = .systemBlue - } -} diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift index 151709797..1799cf27e 100644 --- a/iOSClient/Media/NCMedia.swift +++ b/iOSClient/Media/NCMedia.swift @@ -115,16 +115,13 @@ class NCMedia: UIViewController, NCEmptyDataSetDelegate, NCSelectDelegate { appDelegate.activeViewController = self - // + navigationController?.setMediaAppreance() + NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(moveFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterMoveFile), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(renameFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(uploadedFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUploadedFile), object: nil) - // hide nagigation controller - navigationController?.navigationBar.prefersLargeTitles = true - navigationController?.setNavigationBarHidden(true, animated: false) - self.reloadDataSourceWithCompletion { _ in self.timerSearchNewMedia?.invalidate() self.timerSearchNewMedia = Timer.scheduledTimer(timeInterval: self.timeIntervalSearchNewMedia, target: self, selector: #selector(self.searchNewMediaTimer), userInfo: nil, repeats: false) diff --git a/iOSClient/More/NCMore.swift b/iOSClient/More/NCMore.swift index 4209792b8..09b2522e0 100644 --- a/iOSClient/More/NCMore.swift +++ b/iOSClient/More/NCMore.swift @@ -39,7 +39,8 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { var quotaMenu: [NKExternalSite] = [] let appDelegate = UIApplication.shared.delegate as! AppDelegate - + let defaultCornerRadius: CGFloat = 10.0 + var tabAccount: tableAccount? // MARK: - View Life Cycle @@ -67,6 +68,8 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + navigationController?.setGroupeAppreance() + appDelegate.activeViewController = self loadItems() tableView.reloadData() @@ -269,7 +272,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 0 { - return 35 + return 10 } else { return 20 } @@ -355,7 +358,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { } } - cell.layer.cornerRadius = 15 + cell.layer.cornerRadius = defaultCornerRadius cell.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner, .layerMaxXMaxYCorner, .layerMinXMaxYCorner] return cell @@ -392,7 +395,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { let rows = tableView.numberOfRows(inSection: indexPath.section) if indexPath.row == 0 { - cell.layer.cornerRadius = 15 + cell.layer.cornerRadius = defaultCornerRadius if indexPath.row == rows - 1 { cell.separator.backgroundColor = .clear cell.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner, .layerMaxXMaxYCorner, .layerMinXMaxYCorner] @@ -400,7 +403,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource { cell.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner] } } else if indexPath.row == rows - 1 { - cell.layer.cornerRadius = 15 + cell.layer.cornerRadius = defaultCornerRadius cell.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMinXMaxYCorner] cell.separator.backgroundColor = .clear } diff --git a/iOSClient/Notification/NCNotification.swift b/iOSClient/Notification/NCNotification.swift index d6bf37eb5..8acdc646d 100644 --- a/iOSClient/Notification/NCNotification.swift +++ b/iOSClient/Notification/NCNotification.swift @@ -55,8 +55,9 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty super.viewWillAppear(animated) appDelegate.activeViewController = self + + navigationController?.setFileAppreance() - // NotificationCenter.default.addObserver(self, selector: #selector(initialize), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitialize), object: nil) } diff --git a/iOSClient/Offline/NCOffline.swift b/iOSClient/Offline/NCOffline.swift index 06b1f7e99..934bf2bba 100644 --- a/iOSClient/Offline/NCOffline.swift +++ b/iOSClient/Offline/NCOffline.swift @@ -42,6 +42,12 @@ class NCOffline: NCCollectionViewCommon { emptyDescription = "_tutorial_offline_view_" } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setFileAppreance() + } + // MARK: - DataSource + NC Endpoint override func reloadDataSource(forced: Bool = true) { diff --git a/iOSClient/Recent/NCRecent.swift b/iOSClient/Recent/NCRecent.swift index ee704c3d4..635e0a313 100644 --- a/iOSClient/Recent/NCRecent.swift +++ b/iOSClient/Recent/NCRecent.swift @@ -42,6 +42,12 @@ class NCRecent: NCCollectionViewCommon { emptyDescription = "" } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setFileAppreance() + } + // MARK: - DataSource + NC Endpoint override func reloadDataSource(forced: Bool = true) { diff --git a/iOSClient/Shares/NCShares.swift b/iOSClient/Shares/NCShares.swift index 6ae521c06..668fc2239 100644 --- a/iOSClient/Shares/NCShares.swift +++ b/iOSClient/Shares/NCShares.swift @@ -42,6 +42,12 @@ class NCShares: NCCollectionViewCommon { emptyDescription = "_tutorial_list_shares_view_" } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setFileAppreance() + } + // MARK: - DataSource + NC Endpoint override func reloadDataSource(forced: Bool = true) { diff --git a/iOSClient/Transfers/NCTransfers.swift b/iOSClient/Transfers/NCTransfers.swift index 31e6b3baf..f2b603144 100644 --- a/iOSClient/Transfers/NCTransfers.swift +++ b/iOSClient/Transfers/NCTransfers.swift @@ -52,6 +52,12 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate { self.navigationItem.title = titleCurrentFolder } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setFileAppreance() + } + override func setNavigationItem() { self.navigationItem.rightBarButtonItem = nil self.navigationItem.leftBarButtonItem = nil diff --git a/iOSClient/Trash/NCTrash.swift b/iOSClient/Trash/NCTrash.swift index 4509f7844..7a451135f 100644 --- a/iOSClient/Trash/NCTrash.swift +++ b/iOSClient/Trash/NCTrash.swift @@ -85,7 +85,8 @@ class NCTrash: UIViewController, NCSelectableNavigationView, NCTrashListCellDele appDelegate.activeViewController = self - self.navigationItem.title = titleCurrentFolder + navigationController?.setFileAppreance() + navigationItem.title = titleCurrentFolder layoutForView = NCUtility.shared.getLayoutForView(key: NCGlobal.shared.layoutViewTrash, serverUrl: "", sort: "date", ascending: false, titleButtonHeader: "_sorted_by_date_more_recent_") gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3) |