ChatScreenViewModel

class ChatScreenViewModel(di: DI, savedStateHandle: SavedStateHandle) : ViewModel

ViewModel for the Chat Screen.

Responsible for managing chat messages, device status, and conversation information.

Parameters

di

Dependency Injection container to provide required services and repositories.

savedStateHandle

Handles saved state, including virtualAddress and conversationId.

Constructors

Link copied to clipboard
constructor(di: DI, savedStateHandle: SavedStateHandle)

Properties

Link copied to clipboard
val deviceOnlineStatus: StateFlow<Boolean>
Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard

Adds an outgoing file transfer for a given device.

Link copied to clipboard
Link copied to clipboard
fun sendChatMessage(virtualAddress: InetAddress, message: String, file: URI?)

Sends a chat message to a virtual device.