simplify CustomPicker and fix ios18 runtime error

This fixes a reflection runtime error for our custom picker

Fixes: https://github.com/damus-io/damus/issues/2332
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-07-14 20:13:57 -07:00
parent 616f730ae5
commit 4a332c7ffa
6 changed files with 31 additions and 43 deletions

View File

@@ -117,17 +117,11 @@ struct NotificationsView: View {
}
.safeAreaInset(edge: .top, spacing: 0) {
VStack(spacing: 0) {
CustomPicker(selection: $filter_state, content: {
Text("All", comment: "Label for filter for all notifications.")
.tag(NotificationFilterState.all)
Text("Zaps", comment: "Label for filter for zap notifications.")
.tag(NotificationFilterState.zaps)
Text("Mentions", comment: "Label for filter for seeing mention notifications (replies, etc).")
.tag(NotificationFilterState.replies)
})
CustomPicker(tabs: [
("All", NotificationFilterState.all),
("Zaps", NotificationFilterState.zaps),
("Mentions", NotificationFilterState.replies),
], selection: $filter_state)
Divider()
.frame(height: 1)
}