reduce dif

This commit is contained in:
Levitating Pineapple
2024-09-26 00:03:26 +03:00
parent cabf8aba16
commit fcde05e9a4
2 changed files with 16 additions and 15 deletions

View File

@@ -47,18 +47,16 @@ struct ChatListView: View {
}
private var viewBody: some View {
ZStack {
ZStack(alignment: oneHandUI ? .bottomLeading : .topLeading) {
NavStackCompat(
isActive: Binding(
get: { chatModel.chatId != nil },
set: { active in
if !active { chatModel.chatId = nil }
}
),
destination: chatView
) { chatListView }
}
ZStack(alignment: oneHandUI ? .bottomLeading : .topLeading) {
NavStackCompat(
isActive: Binding(
get: { chatModel.chatId != nil },
set: { active in
if !active { chatModel.chatId = nil }
}
),
destination: chatView
) { chatListView }
}
.modifier(
Sheet(isPresented: $userPickerShown) {

View File

@@ -166,14 +166,17 @@ struct UserPicker: View {
}
private func openSheetOnTap(_ icon: String, title: LocalizedStringKey, sheet: UserPickerSheet) -> some View {
settingsRow(icon, color: theme.colors.secondary) {
Text(title).foregroundColor(.primary)
Button {
activeSheet = sheet
} label: {
settingsRow(icon, color: theme.colors.secondary) {
Text(title).foregroundColor(.primary)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, rowPadding)
.padding(.vertical, rowVerticalPadding)
.contentShape(Rectangle())
.onTapGesture { activeSheet = sheet }
}
private func unreadBadge(_ u: UserInfo) -> some View {