diff --git a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/PlayerRequest.swift b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/PlayerRequest.swift index 20c275d64..a2b4f0e04 100644 --- a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/PlayerRequest.swift +++ b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/PlayerRequest.swift @@ -33,7 +33,9 @@ struct PlayerRequest: Queryable { .trackingConstantRegion(fetchValue(_:)) .publisher( in: appDatabase.databaseReader, - scheduling: .immediate) // Feed the view without delay + // Immediate scheduling feeds the view right on subscription, + // and avoids an undesired animation when the application starts. + scheduling: .immediate) .eraseToAnyPublisher() } diff --git a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo/PlayerRequest.swift b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo/PlayerRequest.swift index 20c275d64..a2b4f0e04 100644 --- a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo/PlayerRequest.swift +++ b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo/PlayerRequest.swift @@ -33,7 +33,9 @@ struct PlayerRequest: Queryable { .trackingConstantRegion(fetchValue(_:)) .publisher( in: appDatabase.databaseReader, - scheduling: .immediate) // Feed the view without delay + // Immediate scheduling feeds the view right on subscription, + // and avoids an undesired animation when the application starts. + scheduling: .immediate) .eraseToAnyPublisher() } diff --git a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/ViewControllers/PlayerListViewController.swift b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/ViewControllers/PlayerListViewController.swift index ce2339e62..c278557a2 100644 --- a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/ViewControllers/PlayerListViewController.swift +++ b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/ViewControllers/PlayerListViewController.swift @@ -110,6 +110,8 @@ class PlayerListViewController: UITableViewController { .tracking(request.fetchAll(_:)) .start( in: AppDatabase.shared.databaseReader, + // Immediate scheduling feeds the data source right on subscription, + // and avoids an undesired animation when the application starts. scheduling: .immediate, onError: { error in fatalError("Unexpected error: \(error)") }, onChange: { [weak self] players in