From 029fcbca02cb9523ef8fd12f84a863a489a6d320 Mon Sep 17 00:00:00 2001 From: Eric Dahl Date: Thu, 22 Oct 2026 23:56:46 -0400 Subject: [PATCH] Refactor: the screenshot launch flags move out of RecordScreenModel.start() (#890) start() ran -demoDrive, -demoNames and -demoRecord inline after the real startup work. They are now runScreenshotFlags(), called last, with the same code in the same order. Assisted-by: Claude Code:claude-sonnet-5-5 --- App/RecordScreen.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/App/RecordScreen.swift b/App/RecordScreen.swift index f35d41f9..42e83d9e 100644 --- a/App/RecordScreen.swift +++ b/App/RecordScreen.swift @@ -1526,6 +1526,12 @@ final class RecordScreenModel { Task { await offerDriveOnlyMovesIfAvailable() } if DriveSpeedTestAvailability.isAvailableInThisBuild { speedTest.removeLeftovers(store: drive.store) } Task { await recorder.recoverAbandonedCopies() } + runScreenshotFlags() + } + + /// The screenshot and layout-check launch flags (`-demoDrive`, `-demoNames`, `-demoRecord`). None does anything in a + /// normal launch. + private func runScreenshotFlags() { // `-demoDrive` (screenshots) uses a folder in the app's own container as the Drive, so the shots show a second // Copy instead of a "No Drive" warning. // Both touch the container's data (the Drive bookmark, saved names), so they act only in the screenshot build,