SPB Git

Repository Public

SystemIntegration.swift 705 B 17 lines swift

1// SP Notes iOS2// File: App/Intents/SystemIntegration.swift3// Description: What ties the application model to the system surfaces of 2.0: the widgets follow the app-lock setting (their4//              timelines are reloaded at once when it changes, and once after the update that introduced the mirrored flag).5//6// Author: Simon-Pierre Boucher7// Contact: contact@spboucher.ai8import Foundation910extension AppModel {11    /// Called once per model by `AppRuntime` (and by the tests on their own models). Idempotent.12    func installSystemIntegration() {13        lock.onEnabledChange = { [weak self] _ in self?.widgets.reloadNow() }14        if lock.mirrorChangedAtLaunch { widgets.reloadNow() }15    }16}17
Files main
Menu

Theme