SettingsViewModel

class SettingsViewModel(radioConfigRepository: RadioConfigRepository, radioController: RadioController, nodeRepository: NodeRepository, uiPrefs: UiPrefs, buildConfigProvider: BuildConfigProvider, databaseManager: DatabaseManager, meshLogPrefs: MeshLogPrefs, notificationPrefs: NotificationPrefs, setThemeUseCase: SetThemeUseCase, setLocaleUseCase: SetLocaleUseCase, setAppIntroCompletedUseCase: SetAppIntroCompletedUseCase, setProvideLocationUseCase: SetProvideLocationUseCase, setDatabaseCacheLimitUseCase: SetDatabaseCacheLimitUseCase, setMeshLogSettingsUseCase: SetMeshLogSettingsUseCase, setNotificationSettingsUseCase: SetNotificationSettingsUseCase, meshLocationUseCase: MeshLocationUseCase, exportDataUseCase: ExportDataUseCase, isOtaCapableUseCase: IsOtaCapableUseCase, fileService: FileService) : ViewModel(source)

Constructors

Link copied to clipboard
constructor(radioConfigRepository: RadioConfigRepository, radioController: RadioController, nodeRepository: NodeRepository, uiPrefs: UiPrefs, buildConfigProvider: BuildConfigProvider, databaseManager: DatabaseManager, meshLogPrefs: MeshLogPrefs, notificationPrefs: NotificationPrefs, setThemeUseCase: SetThemeUseCase, setLocaleUseCase: SetLocaleUseCase, setAppIntroCompletedUseCase: SetAppIntroCompletedUseCase, setProvideLocationUseCase: SetProvideLocationUseCase, setDatabaseCacheLimitUseCase: SetDatabaseCacheLimitUseCase, setMeshLogSettingsUseCase: SetMeshLogSettingsUseCase, setNotificationSettingsUseCase: SetNotificationSettingsUseCase, meshLocationUseCase: MeshLocationUseCase, exportDataUseCase: ExportDataUseCase, isOtaCapableUseCase: IsOtaCapableUseCase, fileService: FileService)

Properties

Link copied to clipboard
Link copied to clipboard
val dbCacheLimit: StateFlow<Int>
Link copied to clipboard
Link copied to clipboard
val isConnected: StateFlow<Boolean>
Link copied to clipboard
val isOtaCapable: StateFlow<Boolean>
Link copied to clipboard
Link copied to clipboard
val localConfig: StateFlow<LocalConfig>
Link copied to clipboard
val lowBatteryEnabled: StateFlow<Boolean>
Link copied to clipboard
Link copied to clipboard
val meshLogRetentionDays: StateFlow<Int>
Link copied to clipboard
val messagesEnabled: StateFlow<Boolean>
Link copied to clipboard
val myNodeInfo: StateFlow<MyNodeInfo?>
Link copied to clipboard
Link copied to clipboard
val nodeEventsEnabled: StateFlow<Boolean>
Link copied to clipboard
val nodeListDensity: StateFlow<String>
Link copied to clipboard
Link copied to clipboard
val ourNodeInfo: StateFlow<Node?>
Link copied to clipboard
val provideLocation: StateFlow<Boolean>
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

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
fun saveDataCsv(uri: CommonUri, filterPortnum: Int? = null)

Export all persisted packet data to a CSV file at the given URI.

Link copied to clipboard
fun setDbCacheLimit(limit: Int)
Link copied to clipboard
Link copied to clipboard
fun setLocale(languageTag: String)

Set the application locale. Empty string means system default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setTheme(theme: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard