eleven / ocho Public

ios+mac: filter menu leads with the current view — an accidental tap changes nothing (#551)

The funnel menu opened with "Online only" as its first row, right where
an accidental tap lands, instantly narrowing the list. The online filter
is now a two-option picker (All chats / Online only) whose *current*
selection is listed first with the checkmark — tapping it re-picks the
view you're already in, a no-op.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 70c503bb9f0f97d0c84b65b64241f15a3c598809 parent 85a13aa
2 files changed, +18 −2
  • ios/LChat/Views/ThreadListView.swift +9 −1
  • ios/LChatMac/NativeChatView.swift +9 −1
diff --git a/ios/LChat/Views/ThreadListView.swift b/ios/LChat/Views/ThreadListView.swift
index 52f942d..796ff0e 100644
--- a/ios/LChat/Views/ThreadListView.swift
+++ b/ios/LChat/Views/ThreadListView.swift
@@ -129,7 +129,15 @@ struct ThreadListView: View {
// People/Bots/Apps categories. Filled glyph while narrowing.
ToolbarItem(placement: .topBarTrailing) {
Menu {
- Toggle("Online only", isOn: $filterOnline)
+ // The view you're already in sits first (checked), so an
+ // accidental tap on the top row re-picks it — a no-op —
+ // instead of instantly narrowing the list.
+ Picker("View", selection: $filterOnline) {
+ ForEach(filterOnline ? [true, false] : [false, true], id: \.self) { on in
+ Text(on ? "Online only" : "All chats").tag(on)
+ }
+ }
+ .pickerStyle(.inline)
Divider()
Toggle("People", isOn: $filterPeople)
Toggle("Bots", isOn: $filterBots)
diff --git a/ios/LChatMac/NativeChatView.swift b/ios/LChatMac/NativeChatView.swift
index 8747bbb..1aa34be 100644
--- a/ios/LChatMac/NativeChatView.swift
+++ b/ios/LChatMac/NativeChatView.swift
@@ -810,7 +810,15 @@ struct NativeChatView: View {
// List filters (web's funnel beside search): online-only +
// the People/Bots/Apps categories. Filled while narrowing.
Menu {
- Toggle("Online only", isOn: $filterOnline)
+ // The view you're already in sits first (checked), so an
+ // accidental click on the top row re-picks it — a no-op —
+ // instead of instantly narrowing the list.
+ Picker("View", selection: $filterOnline) {
+ ForEach(filterOnline ? [true, false] : [false, true], id: \.self) { on in
+ Text(on ? "Online only" : "All chats").tag(on)
+ }
+ }
+ .pickerStyle(.inline)
Divider()
Toggle("People", isOn: $filterPeople)
Toggle("Bots", isOn: $filterBots)