NodeListViewModel

class NodeListViewModel(savedStateHandle: SavedStateHandle, nodeRepository: NodeRepository, radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, radioController: RadioController, radioInterfaceService: RadioInterfaceService, deviceHardwareRepository: DeviceHardwareRepository, val nodeManagementActions: NodeManagementActions, nodeRequestActions: NodeRequestActions, getFilteredNodesUseCase: GetFilteredNodesUseCase, val nodeFilterPreferences: NodeFilterPreferences) : ViewModel(source)

Constructors

Link copied to clipboard
constructor(savedStateHandle: SavedStateHandle, nodeRepository: NodeRepository, radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, radioController: RadioController, radioInterfaceService: RadioInterfaceService, deviceHardwareRepository: DeviceHardwareRepository, nodeManagementActions: NodeManagementActions, nodeRequestActions: NodeRequestActions, getFilteredNodesUseCase: GetFilteredNodesUseCase, nodeFilterPreferences: NodeFilterPreferences)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val deviceImageUrls: StateFlow<Map<Int, String>>

Maps hw_model int value → device image URL from the flasher CDN.

Link copied to clipboard
val deviceType: StateFlow<DeviceType?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val nodeList: StateFlow<List<Node>>
Link copied to clipboard
Link copied to clipboard
val nodesUiState: StateFlow<NodesUiState>
Link copied to clipboard
val onlineNodeCount: StateFlow<Int>
Link copied to clipboard
val ourNodeInfo: StateFlow<Node?>
Link copied to clipboard
val shouldShowChannel: StateFlow<Boolean>
Link copied to clipboard
val shouldShowHops: StateFlow<Boolean>
Link copied to clipboard
Link copied to clipboard
val shouldShowLocation: StateFlow<Boolean>
Link copied to clipboard
val shouldShowPower: StateFlow<Boolean>
Link copied to clipboard
val shouldShowRole: StateFlow<Boolean>
Link copied to clipboard
val shouldShowSignal: StateFlow<Boolean>
Link copied to clipboard
Link copied to clipboard
val totalNodeCount: StateFlow<Int>
Link copied to clipboard
val unfilteredNodeList: StateFlow<List<Node>>

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun favoriteNode(node: Node)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard

Returns the contact key for navigating to a direct message conversation with this node.

Link copied to clipboard
fun ignoreNode(node: Node)
Link copied to clipboard
fun muteNode(node: Node)
Link copied to clipboard
fun removeNode(node: Node)
Link copied to clipboard
fun setChannels(channelSet: ChannelSet): Job
Link copied to clipboard
Link copied to clipboard
fun traceRoute(node: Node)

Initiates a trace route request to the specified node.