mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Make the RoomInfo isPrivate field optional and handle it accordingly.
This commit is contained in:
committed by
Stefan Ceriu
parent
11c7d07e76
commit
bfd97cd560
@@ -92,7 +92,7 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
case .always:
|
||||
false
|
||||
case .privateOnly:
|
||||
!roomProxy.infoPublisher.value.isPrivate
|
||||
!(roomProxy.infoPublisher.value.isPrivate ?? true)
|
||||
case .never:
|
||||
true
|
||||
}
|
||||
@@ -524,7 +524,7 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
case .privateOnly:
|
||||
guard let self else { return Just(false).eraseToAnyPublisher() }
|
||||
return roomProxy.infoPublisher
|
||||
.map { !$0.isPrivate }
|
||||
.map { !($0.isPrivate ?? false) }
|
||||
.removeDuplicates()
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user