diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index 9df896f21..8a83f181a 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -660,5 +660,8 @@ class BWIBuildSettings: NSObject { // MARK: itunes var itunesAppLink = "" + + // MARK: itunes + var showAllChatsFilterMenu = false } diff --git a/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/Contents.json b/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/Contents.json new file mode 100644 index 000000000..b76053693 --- /dev/null +++ b/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "settings-filled.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/settings-filled.svg b/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/settings-filled.svg new file mode 100644 index 000000000..82adbb752 --- /dev/null +++ b/Riot/Assets/Images.xcassets/BWI/bwi_settings_filled.imageset/settings-filled.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Riot/Assets/de.lproj/Vector.strings b/Riot/Assets/de.lproj/Vector.strings index d6a80382a..36706d4b3 100644 --- a/Riot/Assets/de.lproj/Vector.strings +++ b/Riot/Assets/de.lproj/Vector.strings @@ -2452,7 +2452,7 @@ // Mark: - All Chats -"all_chats_title" = "Alle Unterhaltungen"; +"all_chats_title" = "Unterhaltungen"; "all_chats_empty_view_title" = "%@\nsieht ein bisschen leer aus."; "all_chats_all_filter" = "Alle"; "all_chats_edit_layout_show_filters" = "Filter anzeigen"; diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index e22420771..82921b0c2 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -2279,7 +2279,7 @@ Tap the + to start adding people."; // MARK: - All Chats -"all_chats_title" = "All chats"; +"all_chats_title" = "Chats"; "all_chats_section_title" = "Chats"; "all_chats_edit_layout" = "Layout preferences"; "all_chats_edit_layout_recents" = "Recents"; diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 82d1e4fc2..85039cc73 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -388,7 +388,11 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { let avatarInsets: UIEdgeInsets = .init(top: 7, left: 7, bottom: 7, right: 7) var button: UIButton = .init(frame: view.bounds) button.imageEdgeInsets = avatarInsets - button.setImage(Asset.Images.tabPeople.image, for: .normal) + + // bwi: 4704 - ui improvements + let gearshapeImage = Asset.Images.bwiSettingsFilled.image + button.setImage(gearshapeImage, for: .normal) + button.tintColor = ThemeService.shared().theme.tintColor if BWIBuildSettings.shared.enableSideMenu { button.menu = avatarMenu @@ -427,16 +431,18 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { } private func updateAvatarButtonItem() { - MXLog.info("[AllChatsCoordinator] updating avatar button item.") - if let avatar = userAvatarViewData(from: currentMatrixSession) { - if avatarMenuView == nil { - MXLog.warning("[AllChatsCoordinator] updateAvatarButtonItem: avatarMenuView is nil.") - } - avatarMenuView?.fill(with: avatar) - avatarMenuButton?.setImage(nil, for: .normal) - } else { - avatarMenuButton?.setImage(Asset.Images.tabPeople.image, for: .normal) - } + // bwi: 4704 - ui improvements (disable view updates) + +// MXLog.info("[AllChatsCoordinator] updating avatar button item.") +// if let avatar = userAvatarViewData(from: currentMatrixSession) { +// if avatarMenuView == nil { +// MXLog.warning("[AllChatsCoordinator] updateAvatarButtonItem: avatarMenuView is nil.") +// } +// avatarMenuView?.fill(with: avatar) +// avatarMenuButton?.setImage(nil, for: .normal) +// } else { +// avatarMenuButton?.setImage(Asset.Images.tabPeople.image, for: .normal) +// } } private func showRoom(withId roomId: String, eventId: String? = nil) { diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index 269b46aa5..4bfe90a31 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -147,8 +147,8 @@ class AllChatsViewController: HomeViewController { updateUI() - navigationItem.largeTitleDisplayMode = .automatic - navigationController?.navigationBar.prefersLargeTitles = true + navigationItem.largeTitleDisplayMode = .never + navigationController?.navigationBar.prefersLargeTitles = false searchController.obscuresBackgroundDuringPresentation = false searchController.searchResultsUpdater = self @@ -619,7 +619,10 @@ class AllChatsViewController: HomeViewController { } private func updateRightNavigationItem(with menu: UIMenu) { - self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(systemName: "ellipsis.circle"), menu: menu) + // bwi 4704 - hide right navigation bar button + if BWIBuildSettings.shared.showAllChatsFilterMenu { + self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(systemName: "ellipsis.circle"), menu: menu) + } } private lazy var spacesButton: BadgedBarButtonItem = { diff --git a/bwi/ServerMaintenance/ServerDownTimeBadge.swift b/bwi/ServerMaintenance/ServerDownTimeBadge.swift index 90e72efcf..ec2a94303 100644 --- a/bwi/ServerMaintenance/ServerDownTimeBadge.swift +++ b/bwi/ServerMaintenance/ServerDownTimeBadge.swift @@ -21,7 +21,7 @@ import UIKit @objcMembers class ServerDowntimeBadge : NSObject { func applyBadgeToButton(button: UIButton, color: UIColor) -> UIButton { - let badge = UILabel.init(frame: CGRect.init(x: 15, y: 0, width: 15, height: 15)) + let badge = UILabel.init(frame: CGRect.init(x: 20, y: 0, width: 15, height: 15)) badge.backgroundColor = color badge.clipsToBounds = true badge.layer.cornerRadius = 7