ChannelViewModel

class ChannelViewModel @Inject constructor(serviceRepository: ServiceRepository, radioConfigRepository: RadioConfigRepository, analytics: PlatformAnalytics) : ViewModel(source)

Constructors

Link copied to clipboard
@Inject
constructor(serviceRepository: ServiceRepository, radioConfigRepository: RadioConfigRepository, analytics: PlatformAnalytics)

Properties

Link copied to clipboard
val channels: StateFlow<AppOnlyProtos.ChannelSet>
Link copied to clipboard
val connectionState: StateFlow<ConnectionState>
Link copied to clipboard
Link copied to clipboard
val localConfig: StateFlow<LocalOnlyProtos.LocalConfig?>
Link copied to clipboard
var region: ConfigProtos.Config.LoRaConfig.RegionCode
Link copied to clipboard
val requestChannelSet: StateFlow<AppOnlyProtos.ChannelSet?>
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun requestChannelUrl(url: Uri, onError: () -> Unit): Result<Unit>
Link copied to clipboard
fun setChannel(channel: ChannelProtos.Channel)
Link copied to clipboard
fun setChannels(channelSet: AppOnlyProtos.ChannelSet): Job

Set the radio config (also updates our saved copy in preferences).

Link copied to clipboard
fun setConfig(config: ConfigProtos.Config)
Link copied to clipboard