mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
limit knock FF only room creation and access type changes
# Conflicts: # ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift
This commit is contained in:
committed by
Stefan Ceriu
parent
272c8ca764
commit
d02459d9b8
@@ -238,7 +238,7 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
||||
case .invite:
|
||||
state.mode = .inviteRequired
|
||||
case .knock, .knockRestricted:
|
||||
state.mode = appSettings.knockingEnabled ? .knockable : .joinable
|
||||
state.mode = .knockable
|
||||
case .restricted(let rules):
|
||||
state.mode = clientProxy.canJoinRoom(with: rules) ? .joinable : .restricted
|
||||
default:
|
||||
@@ -261,7 +261,7 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
||||
case .invite:
|
||||
state.mode = .inviteRequired
|
||||
case .knock, .knockRestricted:
|
||||
state.mode = appSettings.knockingEnabled ? .knockable : .joinable
|
||||
state.mode = .knockable
|
||||
case .restricted(let rules):
|
||||
state.mode = clientProxy.canJoinRoom(with: rules) ? .joinable : .restricted
|
||||
default:
|
||||
|
||||
@@ -404,8 +404,7 @@ struct JoinRoomScreenPreviewWrapper: Identifiable {
|
||||
self.customPreviewName = customPreviewName
|
||||
|
||||
let appSettings = AppSettings()
|
||||
appSettings.knockingEnabled = true
|
||||
|
||||
|
||||
let clientProxy = ClientProxyMock(.init(hideInviteAvatars: hideInviteAvatars))
|
||||
clientProxy.canJoinRoomWithReturnValue = canJoinRoom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user