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
+5 -7
View File
@@ -72,13 +72,11 @@ struct DirectMessagesView: View {
var body: some View {
VStack(spacing: 0) {
CustomPicker(selection: $dm_type, content: {
Text("DMs", comment: "Picker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message.")
.tag(DMType.friend)
Text("Requests", comment: "Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.")
.tag(DMType.rando)
})
CustomPicker(tabs: [
("DMs", DMType.friend),
("Requests", DMType.rando),
], selection: $dm_type)
Divider()
.frame(height: 1)