Fixes #2486 - Implement blocked users management in the app settings

This commit is contained in:
Stefan Ceriu
2024-02-28 13:21:54 +02:00
committed by GitHub
parent a0b510cb6b
commit 7615e97c7f
46 changed files with 624 additions and 98 deletions
@@ -32,6 +32,7 @@ enum SettingsScreenCoordinatorAction {
case appLock
case bugReport
case about
case blockedUsers
case sessionVerification
case accountSessions
case notifications
@@ -74,6 +75,8 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
actionsSubject.send(.bugReport)
case .about:
actionsSubject.send(.about)
case .blockedUsers:
actionsSubject.send(.blockedUsers)
case .sessionVerification:
actionsSubject.send(.sessionVerification)
case .secureBackup:
@@ -25,6 +25,7 @@ enum SettingsScreenViewModelAction {
case appLock
case reportBug
case about
case blockedUsers
case sessionVerification
case secureBackup
case accountSessionsList
@@ -61,6 +62,7 @@ enum SettingsScreenViewAction {
case appLock
case reportBug
case about
case blockedUsers
case sessionVerification
case secureBackup
case accountSessionsList
@@ -34,12 +34,12 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
showDeveloperOptions: appSettings.isDevelopmentBuild),
imageProvider: userSession.mediaProvider)
userSession.clientProxy.userAvatarURL
userSession.clientProxy.userAvatarURLPublisher
.receive(on: DispatchQueue.main)
.weakAssign(to: \.state.userAvatarURL, on: self)
.store(in: &cancellables)
userSession.clientProxy.userDisplayName
userSession.clientProxy.userDisplayNamePublisher
.receive(on: DispatchQueue.main)
.weakAssign(to: \.state.userDisplayName, on: self)
.store(in: &cancellables)
@@ -94,6 +94,8 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
actionsSubject.send(.reportBug)
case .about:
actionsSubject.send(.about)
case .blockedUsers:
actionsSubject.send(.blockedUsers)
case .logout:
actionsSubject.send(.logout)
case .sessionVerification:
@@ -143,6 +143,13 @@ struct SettingsScreen: View {
context.send(viewAction: .about)
})
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.about)
ListRow(label: .default(title: L10n.commonBlockedUsers,
icon: \.block),
kind: .navigationLink {
context.send(viewAction: .blockedUsers)
})
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.blockedUsers)
}
}