|
@@ -632,14 +632,19 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
if serverUrl == NCUtilityFileSystem.shared.getHomeServer(urlBase: appDelegate.urlBase, account: appDelegate.account) {
|
|
|
|
|
|
let activeAccount = NCManageDatabase.shared.getActiveAccount()
|
|
|
- var title = " "
|
|
|
+ var titleButton = " "
|
|
|
+
|
|
|
if activeAccount?.alias == "" {
|
|
|
- title = title + (activeAccount?.user ?? "")
|
|
|
+ titleButton = titleButton + (activeAccount?.user ?? "")
|
|
|
} else {
|
|
|
- title = title + (activeAccount?.alias ?? "")
|
|
|
+ titleButton = titleButton + (activeAccount?.alias ?? "")
|
|
|
+ }
|
|
|
+
|
|
|
+ if getNavigationTitle() == activeAccount?.alias {
|
|
|
+ titleButton = ""
|
|
|
}
|
|
|
|
|
|
- button.setTitle(title, for: .normal)
|
|
|
+ button.setTitle(titleButton, for: .normal)
|
|
|
button.setTitleColor(.systemBlue, for: .normal)
|
|
|
}
|
|
|
|
|
@@ -653,6 +658,16 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func getNavigationTitle() -> String {
|
|
|
+
|
|
|
+ let activeAccount = NCManageDatabase.shared.getActiveAccount()
|
|
|
+ if activeAccount?.alias == "" {
|
|
|
+ return NCBrandOptions.shared.brand
|
|
|
+ } else {
|
|
|
+ return activeAccount?.alias ?? NCBrandOptions.shared.brand
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: - BackgroundImageColor Delegate
|
|
|
|
|
|
func colorPickerCancel() {
|