From 1fb3e98d11a8923671472ffcd1ed905d33f0ff8f Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 3 May 2024 11:37:31 +0400 Subject: [PATCH] make filter button easier to press --- .../ios/Shared/Views/ChatList/ChatsView.swift | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatsView.swift b/apps/ios/Shared/Views/ChatList/ChatsView.swift index bdb10b1180..4ed2460bc1 100644 --- a/apps/ios/Shared/Views/ChatList/ChatsView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatsView.swift @@ -254,6 +254,11 @@ struct ChatsSearchBar: View { searchFocussed = false } } else if m.chats.count > 0 { +// Text("Filter") +// .foregroundColor(.accentColor) +// .onTapGesture { +// showUnreadAndFavorites = !showUnreadAndFavorites +// } toggleFilterButton() } } @@ -296,13 +301,16 @@ struct ChatsSearchBar: View { } private func toggleFilterButton() -> some View { - Image(systemName: "line.3.horizontal.decrease.circle" + (showUnreadAndFavorites ? ".fill" : "")) - .resizable() - .foregroundColor(.accentColor) - .frame(width: 20, height: 20) - .onTapGesture { - showUnreadAndFavorites = !showUnreadAndFavorites + Button { + showUnreadAndFavorites = !showUnreadAndFavorites + } label: { + ZStack { + Color.clear + .frame(width: 30, height: 30) + Image(systemName: "line.3.horizontal.decrease.circle" + (showUnreadAndFavorites ? ".fill" : "")) + .foregroundColor(.accentColor) } + } } private func connect(_ link: String) {