damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 51e07df1b5aa9922ab605ba32cbc1f081914fe4b
parent 2a42723b813d3b6ea7f2f887e14685a934e3968d
Author: Askia Linder <askia.linder@lansforsakringar.se>
Date:   Tue, 17 Jun 2025 23:18:21 +0200

User section will be the last section in MutedView.

Changelog-Changed: Move users-section to be last in muted view
Signed-off-by: Askeew <askeew@hotmail.com>
Closes: https://github.com/damus-io/damus/issues/2939

Diffstat:
Mdamus/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 @@ -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 {