diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 1da3b89caf..f96ec33b09 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -659,7 +659,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService, configuration: configuration, - elementCallPictureInPictureEnabled: false, + allowPictureInPicture: false, appHooks: appHooks)) callScreenCoordinator.actions diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index 7adb5f05d0..2ac15cdd76 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -47,7 +47,6 @@ final class AppSettings { case publicSearchEnabled case fuzzyRoomListSearchEnabled case pinningEnabled - case elementCallPictureInPictureEnabled } private static var suiteName: String = InfoPlistReader.main.appGroupIdentifier @@ -285,9 +284,6 @@ final class AppSettings { @UserPreference(key: UserDefaultsKeys.pinningEnabled, defaultValue: false, storageType: .userDefaults(store)) var pinningEnabled - - @UserPreference(key: UserDefaultsKeys.elementCallPictureInPictureEnabled, defaultValue: false, storageType: .userDefaults(store)) - var elementCallPictureInPictureEnabled #endif diff --git a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift index f459b5e175..e1091ae57e 100644 --- a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift @@ -589,7 +589,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService, configuration: configuration, - elementCallPictureInPictureEnabled: appSettings.elementCallPictureInPictureEnabled, + allowPictureInPicture: true, appHooks: appHooks)) callScreenCoordinator.actions diff --git a/ElementX/Sources/Screens/CallScreen/CallScreenCoordinator.swift b/ElementX/Sources/Screens/CallScreen/CallScreenCoordinator.swift index da5f45f4e4..05acaca8fb 100644 --- a/ElementX/Sources/Screens/CallScreen/CallScreenCoordinator.swift +++ b/ElementX/Sources/Screens/CallScreen/CallScreenCoordinator.swift @@ -21,7 +21,7 @@ import SwiftUI struct CallScreenCoordinatorParameters { let elementCallService: ElementCallServiceProtocol let configuration: ElementCallConfiguration - let elementCallPictureInPictureEnabled: Bool + let allowPictureInPicture: Bool let appHooks: AppHooks } @@ -46,7 +46,7 @@ final class CallScreenCoordinator: CoordinatorProtocol { init(parameters: CallScreenCoordinatorParameters) { viewModel = CallScreenViewModel(elementCallService: parameters.elementCallService, configuration: parameters.configuration, - elementCallPictureInPictureEnabled: parameters.elementCallPictureInPictureEnabled, + allowPictureInPicture: parameters.allowPictureInPicture, appHooks: parameters.appHooks) } diff --git a/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift b/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift index c4dc8dd637..eecf7f10a3 100644 --- a/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift +++ b/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift @@ -24,7 +24,7 @@ typealias CallScreenViewModelType = StateStoreViewModel