Make the RoomInfo isPrivate field optional and handle it accordingly.

This commit is contained in:
Stefan Ceriu
2025-06-25 17:15:21 +03:00
committed by Stefan Ceriu
parent 11c7d07e76
commit bfd97cd560
6 changed files with 16 additions and 10 deletions
@@ -364,7 +364,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
return
}
if !roomProxy.infoPublisher.value.isPrivate {
if !(roomProxy.infoPublisher.value.isPrivate ?? true) {
state.bindings.leaveRoomAlertItem = LeaveRoomAlertItem(roomID: roomID, isDM: roomProxy.isDirectOneToOneRoom, state: .public)
} else {
state.bindings.leaveRoomAlertItem = if roomProxy.infoPublisher.value.joinedMembersCount > 1 {