From 51e07df1b5aa9922ab605ba32cbc1f081914fe4b Mon Sep 17 00:00:00 2001 From: Askia Linder Date: Tue, 17 Jun 2025 23:18:21 +0200 Subject: [PATCH] User section will be the last section in MutedView. Changelog-Changed: Move users-section to be last in muted view Signed-off-by: Askeew Closes: https://github.com/damus-io/damus/issues/2939 --- damus/Views/Muting/MutelistView.swift | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/damus/Views/Muting/MutelistView.swift b/damus/Views/Muting/MutelistView.swift index 322023ec..dcc25500 100644 --- a/damus/Views/Muting/MutelistView.swift +++ b/damus/Views/Muting/MutelistView.swift @@ -47,20 +47,6 @@ struct MutelistView: View { var body: some View { List { - Section(NSLocalizedString("Users", comment: "Section header title for a list of muted users.")) { - ForEach(users, id: \.self) { user in - if case let MuteItem.user(pubkey, _) = user { - UserViewRow(damus_state: damus_state, pubkey: pubkey) - .id(pubkey) - .swipeActions { - RemoveAction(item: .user(pubkey, nil)) - } - .onTapGesture { - damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey)) - } - } - } - } Section(NSLocalizedString("Hashtags", comment: "Section header title for a list of hashtags that are muted.")) { ForEach(hashtags, id: \.self) { item in if case let MuteItem.hashtag(hashtag, _) = item { @@ -86,10 +72,7 @@ struct MutelistView: View { } } } - Section( - header: Text(NSLocalizedString("Threads", comment: "Section header title for a list of threads that are muted.")), - footer: Text("").padding(.bottom, 10 + tabHeight + getSafeAreaBottom()) - ) { + Section(NSLocalizedString("Threads", comment: "Section header title for a list of threads that are muted.")) { ForEach(threads, id: \.self) { item in if case let MuteItem.thread(note_id, _) = item { if let event = damus_state.events.lookup(note_id) { @@ -104,6 +87,23 @@ struct MutelistView: View { } } } + Section( + header: Text(NSLocalizedString("Users", comment: "Section header title for a list of muted users.")), + footer: Text("").padding(.bottom, 10 + tabHeight + getSafeAreaBottom()) + ) { + ForEach(users, id: \.self) { user in + if case let MuteItem.user(pubkey, _) = user { + UserViewRow(damus_state: damus_state, pubkey: pubkey) + .id(pubkey) + .swipeActions { + RemoveAction(item: .user(pubkey, nil)) + } + .onTapGesture { + damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey)) + } + } + } + } } .navigationTitle(NSLocalizedString("Muted", comment: "Navigation title of view to see list of muted users & phrases.")) .onAppear {