Fixes #2516 - Hide the blocked users section in settings if there aren't any.

This commit is contained in:
Stefan Ceriu
2024-03-01 12:52:49 +02:00
committed by Stefan Ceriu
parent b3e6fdc503
commit d304d98c85
4 changed files with 24 additions and 8 deletions
@@ -144,12 +144,14 @@ struct SettingsScreen: View {
})
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.about)
ListRow(label: .default(title: L10n.commonBlockedUsers,
icon: \.block),
kind: .navigationLink {
context.send(viewAction: .blockedUsers)
})
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.blockedUsers)
if context.viewState.showBlockedUsers {
ListRow(label: .default(title: L10n.commonBlockedUsers,
icon: \.block),
kind: .navigationLink {
context.send(viewAction: .blockedUsers)
})
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.blockedUsers)
}
}
}