MESSENGER-4704 UI Optimierungen Raumübersicht

This commit is contained in:
Arnfried Griesert
2023-08-30 12:34:58 +00:00
parent 08e23f7f6b
commit 7f4c310ecd
8 changed files with 52 additions and 17 deletions

View File

@@ -660,5 +660,8 @@ class BWIBuildSettings: NSObject {
// MARK: itunes
var itunesAppLink = ""
// MARK: itunes
var showAllChatsFilterMenu = false
}

View File

@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "settings-filled.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View File

@@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_674_1214" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
<rect width="24" height="24" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_674_1214)">
<path d="M13.875 22H10.125C9.87497 22 9.6583 21.9167 9.47497 21.75C9.29164 21.5833 9.1833 21.375 9.14997 21.125L8.84997 18.8C8.6333 18.7167 8.42914 18.6167 8.23747 18.5C8.0458 18.3833 7.8583 18.2583 7.67497 18.125L5.49997 19.025C5.26664 19.1083 5.0333 19.1167 4.79997 19.05C4.56664 18.9833 4.3833 18.8417 4.24997 18.625L2.39997 15.4C2.26664 15.1833 2.22497 14.95 2.27497 14.7C2.32497 14.45 2.44997 14.25 2.64997 14.1L4.52497 12.675C4.5083 12.5583 4.49997 12.4458 4.49997 12.3375V11.6625C4.49997 11.5542 4.5083 11.4417 4.52497 11.325L2.64997 9.9C2.44997 9.75 2.32497 9.55 2.27497 9.3C2.22497 9.05 2.26664 8.81667 2.39997 8.6L4.24997 5.375C4.36664 5.14167 4.5458 4.99583 4.78747 4.9375C5.02914 4.87917 5.26664 4.89167 5.49997 4.975L7.67497 5.875C7.8583 5.74167 8.04997 5.61667 8.24997 5.5C8.44997 5.38333 8.64997 5.28333 8.84997 5.2L9.14997 2.875C9.1833 2.625 9.29164 2.41667 9.47497 2.25C9.6583 2.08333 9.87497 2 10.125 2H13.875C14.125 2 14.3416 2.08333 14.525 2.25C14.7083 2.41667 14.8166 2.625 14.85 2.875L15.15 5.2C15.3666 5.28333 15.5708 5.38333 15.7625 5.5C15.9541 5.61667 16.1416 5.74167 16.325 5.875L18.5 4.975C18.7333 4.89167 18.9666 4.88333 19.2 4.95C19.4333 5.01667 19.6166 5.15833 19.75 5.375L21.6 8.6C21.7333 8.81667 21.775 9.05 21.725 9.3C21.675 9.55 21.55 9.75 21.35 9.9L19.475 11.325C19.4916 11.4417 19.5 11.5542 19.5 11.6625V12.3375C19.5 12.4458 19.4833 12.5583 19.45 12.675L21.325 14.1C21.525 14.25 21.65 14.45 21.7 14.7C21.75 14.95 21.7083 15.1833 21.575 15.4L19.725 18.6C19.5916 18.8167 19.4041 18.9625 19.1625 19.0375C18.9208 19.1125 18.6833 19.1083 18.45 19.025L16.325 18.125C16.1416 18.2583 15.95 18.3833 15.75 18.5C15.55 18.6167 15.35 18.7167 15.15 18.8L14.85 21.125C14.8166 21.375 14.7083 21.5833 14.525 21.75C14.3416 21.9167 14.125 22 13.875 22ZM12.05 15.5C13.0166 15.5 13.8416 15.1583 14.525 14.475C15.2083 13.7917 15.55 12.9667 15.55 12C15.55 11.0333 15.2083 10.2083 14.525 9.525C13.8416 8.84167 13.0166 8.5 12.05 8.5C11.0666 8.5 10.2375 8.84167 9.56247 9.525C8.88747 10.2083 8.54997 11.0333 8.54997 12C8.54997 12.9667 8.88747 13.7917 9.56247 14.475C10.2375 15.1583 11.0666 15.5 12.05 15.5Z" fill="#13293D"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -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";

View File

@@ -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";

View File

@@ -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) {

View File

@@ -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 = {

View File

@@ -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