eleven / messenger Public

ios: chat-list header matches Messages — 'Chats' title, compose beside bottom search, cog/filter as separate buttons (#492)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 85a13aa60b906d0595be0547b8561a6c340ce435 parent a09e75a
1 file changed, +26 −15
  • ios/LChat/Views/ThreadListView.swift +26 −15
diff --git a/ios/LChat/Views/ThreadListView.swift b/ios/LChat/Views/ThreadListView.swift
index 1e7a8bf..52f942d 100644
--- a/ios/LChat/Views/ThreadListView.swift
+++ b/ios/LChat/Views/ThreadListView.swift
@@ -102,7 +102,7 @@ struct ThreadListView: View {
}
.overlay { if store.loading && store.threads.isEmpty { ProgressView() } }
.overlay { if !store.loading && store.threads.isEmpty { empty } }
- .navigationTitle(serverTitle) // backs the chat screen's back button
+ .navigationTitle("Chats") // also backs the chat screen's back button
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .topBarLeading) {
@@ -111,18 +111,19 @@ struct ThreadListView: View {
}
.accessibilityLabel("Servers")
}
- // Centered two-line title: server name over its host (the NetNewsWire
- // pattern). A large collapsing title doesn't work over the UIKit list.
+ // Plain "Chats", like the Mac sidebar — which server you're in is
+ // the avatar on the left (it opens the server switcher).
ToolbarItem(placement: .principal) {
- VStack(spacing: 0) {
- Text(serverTitle).font(.headline).lineLimit(1)
- Text(store.instance.hostLabel).font(.caption).foregroundStyle(.secondary).lineLimit(1)
- }
- .accessibilityElement(children: .combine)
+ Text("Chats").font(.headline)
+ }
+ // Cog then filter, each its OWN glass capsule (the spacer splits
+ // them) — settings and filtering are unrelated acts, not a group.
+ ToolbarItem(placement: .topBarTrailing) {
+ Button { showSettings = true } label: { Image(systemName: "gearshape") }
+ .accessibilityLabel("Server settings")
}
- ToolbarItem(placement: .primaryAction) {
- Button { showNew = true } label: { Image(systemName: "square.and.pencil") }
- .accessibilityLabel("New chat")
+ if #available(iOS 26.0, *) {
+ ToolbarSpacer(.fixed, placement: .topBarTrailing)
}
// List filters (web's funnel beside search): online-only + the
// People/Bots/Apps categories. Filled glyph while narrowing.
@@ -140,10 +141,20 @@ struct ThreadListView: View {
}
.accessibilityLabel("Filter chats")
}
- // Per-server settings (profile name, theme) — the cog beside search.
- ToolbarItem(placement: .topBarTrailing) {
- Button { showSettings = true } label: { Image(systemName: "gearshape") }
- .accessibilityLabel("Server settings")
+ // Compose sits beside the bottom search field, like Messages.
+ // Pre-26 systems keep it top-right (no bottom search bar there).
+ if #available(iOS 26.0, *) {
+ DefaultToolbarItem(kind: .search, placement: .bottomBar)
+ ToolbarSpacer(.fixed, placement: .bottomBar)
+ ToolbarItem(placement: .bottomBar) {
+ Button { showNew = true } label: { Image(systemName: "square.and.pencil") }
+ .accessibilityLabel("New chat")
+ }
+ } else {
+ ToolbarItem(placement: .primaryAction) {
+ Button { showNew = true } label: { Image(systemName: "square.and.pencil") }
+ .accessibilityLabel("New chat")
+ }
}
}
.sheet(isPresented: $showNew) {