mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fixes #2516 - Hide the blocked users section in settings if there aren't any.
This commit is contained in:
committed by
Stefan Ceriu
parent
b3e6fdc503
commit
d304d98c85
@@ -72,6 +72,18 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
userSession.clientProxy.ignoredUsersPublisher
|
||||
.receive(on: DispatchQueue.main)
|
||||
.map {
|
||||
guard let blockedUsers = $0 else {
|
||||
return false
|
||||
}
|
||||
|
||||
return !blockedUsers.isEmpty
|
||||
}
|
||||
.weakAssign(to: \.state.showBlockedUsers, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
Task {
|
||||
await userSession.clientProxy.loadUserAvatarURL()
|
||||
await userSession.clientProxy.loadUserDisplayName()
|
||||
|
||||
Reference in New Issue
Block a user