From fcde05e9a4409b808e9714fd5fa9308166cfa480 Mon Sep 17 00:00:00 2001 From: Levitating Pineapple Date: Thu, 26 Sep 2024 00:03:26 +0300 Subject: [PATCH] reduce dif --- .../Shared/Views/ChatList/ChatListView.swift | 22 +++++++++---------- .../Shared/Views/ChatList/UserPicker.swift | 9 +++++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 73aec7fa5a..bb91ec8cb5 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -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) { diff --git a/apps/ios/Shared/Views/ChatList/UserPicker.swift b/apps/ios/Shared/Views/ChatList/UserPicker.swift index 371662cb6c..e04c4cc021 100644 --- a/apps/ios/Shared/Views/ChatList/UserPicker.swift +++ b/apps/ios/Shared/Views/ChatList/UserPicker.swift @@ -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 {