From 53daafa675df0c5da730ce87629f031178d174de Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:19:52 +0000 Subject: [PATCH] ios: put "connect to name" button below search in top bar layout (#7297) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 238ea89e90..27840a07c2 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -638,6 +638,7 @@ struct ChatListSearchBar: View { @Binding var searchShowingSimplexLink: Bool @Binding var searchChatFilteredBySimplexLink: Set @Binding var parentSheet: SomeSheet? + @AppStorage(GROUP_DEFAULT_ONE_HAND_UI, store: groupDefaults) private var oneHandUI = true @State private var ignoreSearchTextChange = false // when the search text is a SimpleX name, the string to connect to (with @/# preserved); nil otherwise @State private var connectNameCandidate: String? = nil @@ -645,8 +646,9 @@ struct ChatListSearchBar: View { var body: some View { VStack(spacing: 12) { - // a typed name replaces the list tags with a row to connect to it (as on Android mobile) - if let candidate = connectNameCandidate { + // a typed name shows a row to connect to it (as on Android mobile): with the reachable toolbar it + // replaces the tags above the search field; in top bar mode the tags stay and it moves below (end of VStack) + if oneHandUI, let candidate = connectNameCandidate { connectByNameRow(candidate) } else { ScrollView([.horizontal], showsIndicators: false) { TagsView(parentSheet: $parentSheet, searchText: $searchText) } @@ -685,6 +687,9 @@ struct ChatListSearchBar: View { toggleFilterButton() } } + if !oneHandUI, let candidate = connectNameCandidate { + connectByNameRow(candidate) + } } .onChange(of: searchFocussed) { sf in withAnimation { searchMode = sf }