NotificationPrefs

Reactive interface for notification preferences.

Properties

Link copied to clipboard
abstract val geofenceAlertOptIns: StateFlow<Set<Int>>

Waypoint ids of foreign (not locally-created) geofences the user has opted in to receiving crossing alerts for. Geofences are mesh-broadcast, so by default only the creator is alerted; this is the per-geofence opt-in.

Link copied to clipboard
abstract val lowBatteryEnabled: StateFlow<Boolean>
Link copied to clipboard
abstract val messagesEnabled: StateFlow<Boolean>
Link copied to clipboard
abstract val newWaypointsEnabled: StateFlow<Boolean>

Desktop opt-in for new waypoint notifications; Android uses the system channel setting instead.

Link copied to clipboard
abstract val nodeEventsAutoDisabledForEvent: StateFlow<Boolean>
Link copied to clipboard
abstract val nodeEventsEnabled: StateFlow<Boolean>
Link copied to clipboard
abstract val reactionsEnabled: StateFlow<Boolean>

Desktop opt-in for emoji reaction notifications; Android uses the system channel setting instead.

Functions

Link copied to clipboard
abstract fun applyEventFirmwareNodeEventDefault(isEventFirmware: Boolean)

Applies the node-event notification default for the connected firmware, as a single atomic update.

Link copied to clipboard
abstract suspend fun loadNewWaypointsEnabled(): Boolean

The persisted newWaypointsEnabled value; unlike the StateFlow it never reports the pre-load default.

Link copied to clipboard
abstract suspend fun loadReactionsEnabled(): Boolean

The persisted reactionsEnabled value; unlike the StateFlow it never reports the pre-load default.

Link copied to clipboard
abstract fun setGeofenceAlertOptIn(waypointId: Int, enabled: Boolean)
Link copied to clipboard
abstract fun setLowBatteryEnabled(enabled: Boolean)
Link copied to clipboard
abstract fun setMessagesEnabled(enabled: Boolean)
Link copied to clipboard
abstract fun setNewWaypointsEnabled(enabled: Boolean)
Link copied to clipboard
Link copied to clipboard
abstract fun setNodeEventsEnabled(enabled: Boolean)
Link copied to clipboard
abstract fun setReactionsEnabled(enabled: Boolean)