mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Introduce a new RoomProxyType and treat rooms differently based on their membership state
This commit is contained in:
committed by
Stefan Ceriu
parent
e0ba9925e7
commit
e281a3f242
+1
-1
@@ -57,7 +57,7 @@ final class NotificationSettingsEditScreenCoordinator: CoordinatorProtocol {
|
||||
// MARK: - Private
|
||||
|
||||
private func presentRoomNotificationSettings(roomID: String) async {
|
||||
guard let roomProxy = await parameters.userSession.clientProxy.roomForIdentifier(roomID) else { return }
|
||||
guard case let .joined(roomProxy) = await parameters.userSession.clientProxy.roomForIdentifier(roomID) else { return }
|
||||
|
||||
let roomNotificationSettingsParameters = RoomNotificationSettingsScreenCoordinatorParameters(navigationStackCoordinator: parameters.navigationStackCoordinator,
|
||||
notificationSettingsProxy: parameters.notificationSettings,
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
|
||||
var roomsWithUserDefinedMode: [NotificationSettingsEditScreenRoom] = []
|
||||
|
||||
for roomSummary in filteredRoomsSummary {
|
||||
guard let roomProxy = await userSession.clientProxy.roomForIdentifier(roomSummary.id) else { continue }
|
||||
guard case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(roomSummary.id) else { continue }
|
||||
// `isOneToOneRoom` here is not the same as `isDirect` on the room. From the point of view of the push rule, a one-to-one room is a room with exactly two active members.
|
||||
let isOneToOneRoom = roomProxy.activeMembersCount == 2
|
||||
// display only the rooms we're interested in
|
||||
|
||||
Reference in New Issue
Block a user