mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fixes #2486 - Implement blocked users management in the app settings
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user