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
This commit is contained in:
committed by
Daniel D’Aquino
parent
2a42723b81
commit
51e07df1b5
@@ -47,20 +47,6 @@ struct MutelistView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List {
|
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.")) {
|
Section(NSLocalizedString("Hashtags", comment: "Section header title for a list of hashtags that are muted.")) {
|
||||||
ForEach(hashtags, id: \.self) { item in
|
ForEach(hashtags, id: \.self) { item in
|
||||||
if case let MuteItem.hashtag(hashtag, _) = item {
|
if case let MuteItem.hashtag(hashtag, _) = item {
|
||||||
@@ -86,10 +72,7 @@ struct MutelistView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Section(
|
Section(NSLocalizedString("Threads", comment: "Section header title for a list of threads that are muted.")) {
|
||||||
header: Text(NSLocalizedString("Threads", comment: "Section header title for a list of threads that are muted.")),
|
|
||||||
footer: Text("").padding(.bottom, 10 + tabHeight + getSafeAreaBottom())
|
|
||||||
) {
|
|
||||||
ForEach(threads, id: \.self) { item in
|
ForEach(threads, id: \.self) { item in
|
||||||
if case let MuteItem.thread(note_id, _) = item {
|
if case let MuteItem.thread(note_id, _) = item {
|
||||||
if let event = damus_state.events.lookup(note_id) {
|
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."))
|
.navigationTitle(NSLocalizedString("Muted", comment: "Navigation title of view to see list of muted users & phrases."))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
|||||||
Reference in New Issue
Block a user