RiValT_ObservableModel
@MainActor
final class RiValT_ObservableModel : ObservableObject
The Watch observes the chosen device. Only that device can change the timer.
-
The live timer sample displayed by the Watch views.
Declaration
Swift
typealias Snapshot = RiValT_WatchDelegate.Snapshot -
An operation the wearer can request from the selected host.
Declaration
Swift
typealias Operation = RiValT_WatchDelegate.TimerOperation -
The app-wide connection shared by the views and background delivery handler.
Declaration
Swift
@MainActor private let connection: RiValT_WatchDelegate -
Whether the Watch scene is active and eligible to play haptics.
Declaration
Swift
@MainActor private var isActive: Bool -
The previous host sample used to detect phase and timer changes.
Declaration
Swift
@MainActor private var previousSnapshot: Snapshot? -
The repeating haptics task while a host-confirmed alarm is active.
Declaration
Swift
@MainActor private var alarmHaptics: Task<Void, Never>? -
Subscribes the view model and its haptics to connection updates.
Declaration
Swift
@MainActor init() -
The most recent timer sample while a live host is reachable.
Declaration
Swift
@MainActor var snapshot: Snapshot? { get } -
Whether the active transport is waiting for a connection or first response.
Declaration
Swift
@MainActor var isConnecting: Bool { get } -
Whether the active connection is reporting a failure.
Declaration
Swift
@MainActor var connectionFailed: Bool { get } -
Whether a timer action is pending acknowledgement.
Declaration
Swift
@MainActor var isSendingCommand: Bool { get } -
Whether the last timer action was rejected.
Declaration
Swift
@MainActor var commandRejected: Bool { get } -
Updates the connection and haptics when the Watch scene becomes active or inactive.
Declaration
Swift
@MainActor func setActive(_ active: Bool) -
React to host-confirmed transitions, never to a locally predicted timer expiry.
Declaration
Swift
@MainActor private func updateHaptics() -
Retries the selected host connection.
Declaration
Swift
@MainActor func reconnect() -
Requests a fresh sample from the active host.
Declaration
Swift
@MainActor func refresh() -
A group can advance or the host can change while the wearer is choosing an action.
View on GitHub
Install in Dash