From 3e621bf425ef50c7ce5bc9bd586ed166d104fbc3 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:07:19 +0100 Subject: [PATCH] Remove the Element Call Picture in Picture feature flag. (#3204) --- ElementX/Sources/Application/AppCoordinator.swift | 2 +- ElementX/Sources/Application/AppSettings.swift | 4 ---- .../FlowCoordinators/UserSessionFlowCoordinator.swift | 2 +- .../Screens/CallScreen/CallScreenCoordinator.swift | 4 ++-- .../Sources/Screens/CallScreen/CallScreenViewModel.swift | 8 ++++---- ElementX/Sources/Screens/CallScreen/View/CallScreen.swift | 2 +- .../DeveloperOptionsScreenModels.swift | 1 - .../View/DeveloperOptionsScreen.swift | 5 ----- 8 files changed, 9 insertions(+), 19 deletions(-) diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 1da3b89ca..f96ec33b0 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 7adb5f05d..2ac15cdd7 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 f459b5e17..e1091ae57 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 da5f45f4e..05acaca8f 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 c4dc8dd63..eecf7f10a 100644 --- a/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift +++ b/ElementX/Sources/Screens/CallScreen/CallScreenViewModel.swift @@ -24,7 +24,7 @@ typealias CallScreenViewModelType = StateStoreViewModel