ContactsViewModel

class ContactsViewModel @Inject constructor(nodeRepository: NodeRepository, packetRepository: PacketRepository, radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository) : ViewModel(source)

Constructors

Link copied to clipboard
@Inject
constructor(nodeRepository: NodeRepository, packetRepository: PacketRepository, radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository)

Properties

Link copied to clipboard
val channels: StateFlow<AppOnlyProtos.ChannelSet>
Link copied to clipboard
val connectionState: StateFlow<ConnectionState>
Link copied to clipboard
val contactList: StateFlow<List<Contact>>

Non-paginated contact list.

Link copied to clipboard
Link copied to clipboard
val ourNodeInfo: StateFlow<Node?>

Functions

Link copied to clipboard
fun deleteContacts(contacts: List<String>): Job
Link copied to clipboard
fun getContactSettings(): Flow<Map<String, ContactSettings>>
Link copied to clipboard
fun getNode(userId: String?): Node
Link copied to clipboard
suspend fun getTotalMessageCount(contactKeys: List<String>): Int

Get the total message count for a list of contact keys. This queries the repository directly, so it works even if contacts aren't loaded in the paged list.

Link copied to clipboard
fun setMuteUntil(contacts: List<String>, until: Long): Job