mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Space tweaks. (#5068)
This commit is contained in:
+4
-1
@@ -49,7 +49,10 @@ class SpaceAddRoomsScreenViewModel: SpaceAddRoomsScreenViewModelType, SpaceAddRo
|
|||||||
let existingRooms = spaceRoomListProxy.spaceRoomsPublisher.value
|
let existingRooms = spaceRoomListProxy.spaceRoomsPublisher.value
|
||||||
suggestedRooms = await userSession.clientProxy
|
suggestedRooms = await userSession.clientProxy
|
||||||
.recentlyVisitedRooms { roomProxy in
|
.recentlyVisitedRooms { roomProxy in
|
||||||
!roomProxy.infoPublisher.value.isDirect && !existingRooms.contains { $0.id == roomProxy.id }
|
!roomProxy.infoPublisher.value.isDirect
|
||||||
|
&& !roomProxy.infoPublisher.value.isSpace
|
||||||
|
&& roomProxy.infoPublisher.value.membership == .joined
|
||||||
|
&& !existingRooms.contains { $0.id == roomProxy.id }
|
||||||
}
|
}
|
||||||
.map { .init(roomProxy: $0) }
|
.map { .init(roomProxy: $0) }
|
||||||
|
|
||||||
|
|||||||
@@ -138,8 +138,10 @@ struct SpaceScreen: View {
|
|||||||
}
|
}
|
||||||
.accessibilityIdentifier(A11yIdentifiers.spaceScreen.addExistingRooms)
|
.accessibilityIdentifier(A11yIdentifiers.spaceScreen.addExistingRooms)
|
||||||
|
|
||||||
Button { context.send(viewAction: .manageChildren) } label: {
|
if context.viewState.rooms.count > 0 {
|
||||||
Label(L10n.actionManageRooms, icon: \.edit)
|
Button { context.send(viewAction: .manageChildren) } label: {
|
||||||
|
Label(L10n.actionManageRooms, icon: \.edit)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user