-
-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe920b4
commit a4d6eb9
Showing
168 changed files
with
1,267 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"13zjVT" = "Account"; | ||
|
||
"CAIVXf" = "Applications"; | ||
|
||
"DN8Bxl" = "Account"; | ||
|
||
"LIw8E9" = "Widget"; | ||
|
||
"NO1rJU" = "Dashboard"; | ||
|
||
"V3exc2" = "Account"; | ||
|
||
"VfbA9C" = "Account"; | ||
|
||
"ZgvlYN" = "Dashboard Widget"; | ||
|
||
"tAlZ1R" = "Accounts"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// SPDX-FileCopyrightText: Nextcloud GmbH | ||
// SPDX-FileCopyrightText: 2025 Marino Faggiana | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
import UIKit | ||
|
||
class NCFavoriteNavigationController: NCMainNavigationController { | ||
override func setNavigationRightItems() { | ||
guard let collectionViewCommon else { | ||
return | ||
} | ||
|
||
func createMenu() -> UIMenu? { | ||
guard let items = self.createMenuActions() | ||
else { | ||
return nil | ||
} | ||
|
||
if collectionViewCommon.layoutKey == global.layoutViewFavorite { | ||
return UIMenu(children: [items.select, items.viewStyleSubmenu, items.sortSubmenu]) | ||
} else { | ||
let additionalSubmenu = UIMenu(title: "", options: .displayInline, children: [items.foldersOnTop, items.personalFilesOnlyAction, items.showDescription]) | ||
return UIMenu(children: [items.select, items.viewStyleSubmenu, items.sortSubmenu, additionalSubmenu]) | ||
} | ||
} | ||
|
||
if collectionViewCommon.isEditMode { | ||
collectionViewCommon.tabBarSelect?.update(fileSelect: collectionViewCommon.fileSelect, metadatas: collectionViewCommon.getSelectedMetadatas(), userId: session.userId) | ||
collectionViewCommon.tabBarSelect?.show() | ||
|
||
let select = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: .done) { | ||
collectionViewCommon.setEditMode(false) | ||
collectionViewCommon.collectionView.reloadData() | ||
} | ||
|
||
self.collectionViewCommon?.navigationItem.rightBarButtonItems = [select] | ||
|
||
} else if self.collectionViewCommon?.navigationItem.rightBarButtonItems == nil || (!collectionViewCommon.isEditMode && !(collectionViewCommon.tabBarSelect?.isHidden() ?? true)) { | ||
collectionViewCommon.tabBarSelect?.hide() | ||
|
||
let menuButton = UIBarButtonItem(image: utility.loadImage(named: "ellipsis.circle"), menu: createMenu()) | ||
menuButton.tag = menuButtonTag | ||
menuButton.tintColor = NCBrandColor.shared.iconImageColor | ||
|
||
self.collectionViewCommon?.navigationItem.rightBarButtonItems = [menuButton] | ||
|
||
} else { | ||
|
||
if let rightBarButtonItems = self.collectionViewCommon?.navigationItem.rightBarButtonItems, | ||
let menuBarButtonItem = rightBarButtonItems.first(where: { $0.tag == menuButtonTag }) { | ||
menuBarButtonItem.menu = createMenu() | ||
} | ||
} | ||
|
||
// fix, if the tabbar was hidden before the update, set it in hidden | ||
if self.tabBarController?.tabBar.isHidden ?? true, | ||
collectionViewCommon.tabBarSelect?.isHidden() ?? true { | ||
self.tabBarController?.tabBar.isHidden = true | ||
} | ||
} | ||
} |
Oops, something went wrong.