UIViewModel

class UIViewModel @Inject constructor(app: Application, nodeDB: NodeRepository, serviceRepository: ServiceRepository, radioInterfaceService: RadioInterfaceService, meshLogRepository: MeshLogRepository, firmwareReleaseRepository: FirmwareReleaseRepository, uiPreferencesDataSource: UiPreferencesDataSource, meshServiceNotifications: MeshServiceNotifications, analytics: PlatformAnalytics, packetRepository: PacketRepository) : ViewModel(source)

Constructors

Link copied to clipboard
@Inject
constructor(app: Application, nodeDB: NodeRepository, serviceRepository: ServiceRepository, radioInterfaceService: RadioInterfaceService, meshLogRepository: MeshLogRepository, firmwareReleaseRepository: FirmwareReleaseRepository, uiPreferencesDataSource: UiPreferencesDataSource, meshServiceNotifications: MeshServiceNotifications, analytics: PlatformAnalytics, packetRepository: PacketRepository)

Types

Link copied to clipboard
data class AlertData(val title: String, val message: String? = null, val html: String? = null, val onConfirm: () -> Unit? = null, val onDismiss: () -> Unit? = null, val choices: Map<String, () -> Unit> = emptyMap())

Properties

Link copied to clipboard
val appIntroCompleted: StateFlow<Boolean>
Link copied to clipboard
val clientNotification: StateFlow<MeshProtos.ClientNotification?>
Link copied to clipboard
val connectionState: StateFlow<ConnectionState>
Link copied to clipboard
Link copied to clipboard
val firmwareEdition: Flow<MeshProtos.FirmwareEdition?>
Link copied to clipboard
val latestStableFirmwareRelease: Flow<DeviceVersion>
Link copied to clipboard
val meshActivity: SharedFlow<MeshActivity>

Emits events for mesh network send/receive activity. This is a SharedFlow to ensure all events are delivered, even if they are the same.

Link copied to clipboard
val meshService: IMeshService?
Link copied to clipboard
val myNodeInfo: StateFlow<MyNodeEntity?>
Link copied to clipboard
val requestChannelSet: StateFlow<AppOnlyProtos.ChannelSet?>
Link copied to clipboard
val scrollToTopEventFlow: Flow<ScrollToTopEvent>
Link copied to clipboard
val sharedContactRequested: StateFlow<AdminProtos.SharedContact?>
Link copied to clipboard
val theme: StateFlow<Int>
Link copied to clipboard
Link copied to clipboard
val unreadMessageCount: StateFlow<Int>

Functions

Link copied to clipboard
Link copied to clipboard
fun clearClientNotification(notification: MeshProtos.ClientNotification)
Link copied to clipboard

Called immediately after activity observes requestChannelUrl

Link copied to clipboard

Called immediately after activity observes requestChannelUrl

Link copied to clipboard
Link copied to clipboard
fun emitScrollToTopEvent(event: ScrollToTopEvent)
Link copied to clipboard
Link copied to clipboard
fun requestChannelUrl(url: Uri, onFailure: () -> Unit): Result<Unit>
Link copied to clipboard
fun setSharedContactRequested(url: Uri, onFailure: () -> Unit)
Link copied to clipboard
fun showAlert(title: String, message: String? = null, html: String? = null, onConfirm: () -> Unit? = {}, dismissable: Boolean = true, choices: Map<String, () -> Unit> = emptyMap())