| | |
| | | controller.onSnapshotUpdated = { [weak self] in |
| | | self?.writeQuickSwitchReportIfNeeded() |
| | | } |
| | | controller.onOpenSettings = { [weak self] in |
| | | self?.showSettingsFromQuickSwitch() |
| | | controller.onToggleWaterfallViewMode = { [weak self] in |
| | | self?.toggleQuickSwitchWaterfallViewModeFromQuickSwitch() |
| | | } |
| | | quickSwitchSessionController = controller |
| | | } |
| | |
| | | controller.onSnapshotUpdated = { [weak self] in |
| | | self?.writeQuickSwitchReportIfNeeded() |
| | | } |
| | | controller.onOpenSettings = { [weak self] in |
| | | self?.showSettingsFromQuickSwitch() |
| | | controller.onToggleWaterfallViewMode = { [weak self] in |
| | | self?.toggleQuickSwitchWaterfallViewModeFromQuickSwitch() |
| | | } |
| | | quickSwitchSessionController = controller |
| | | } |
| | |
| | | return FixtureQuickSwitchSnapshotLoader(appCount: 1, mode: .splitView) |
| | | } |
| | | |
| | | if round1QuickSwitchOptions.fixtureMultiPageIdentity { |
| | | return FixtureQuickSwitchSnapshotLoader(appCount: 1, mode: .multiPageIdentity) |
| | | } |
| | | |
| | | if let fixtureAppCount = round1QuickSwitchOptions.fixtureAppCount { |
| | | return FixtureQuickSwitchSnapshotLoader( |
| | | appCount: fixtureAppCount, |
| | |
| | | ]) |
| | | } |
| | | |
| | | private func toggleQuickSwitchWaterfallViewModeFromQuickSwitch() { |
| | | let currentMode = quickSwitchWaterfallViewMode() |
| | | let nextMode: QuickSwitchWaterfallViewMode = currentMode == .horizontalMasonry |
| | | ? .verticalColumns |
| | | : .horizontalMasonry |
| | | DevelopmentDiagnostics.log("app.quickSwitch.waterfallViewModeToggle", [ |
| | | "currentMode": currentMode.rawValue, |
| | | "nextMode": nextMode.rawValue, |
| | | "quickSwitchVisible": quickSwitchSessionController?.isVisible ?? false |
| | | ]) |
| | | setQuickSwitchWaterfallViewMode(nextMode) |
| | | } |
| | | |
| | | private func appVersionBuild() -> (version: String, build: String) { |
| | | let info = Bundle.main.infoDictionary ?? [:] |
| | | let version = info["CFBundleShortVersionString"] as? String ?? "Unknown" |