| | |
| | | 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 |
| | | } |
| | |
| | | ]) |
| | | } |
| | | |
| | | 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" |