GithubViewModel

class GithubViewModel(val remoteUserName: String, val remoteRepository: String, val remotePrereleaseTag: String, val remoteContentType: String, val versionName: String, val isPrerelease: Boolean, val isDebug: Boolean, val buildSha: String, val settings: AppSettings, val updater: AppUpdater) : ViewModel, StateContainer<GithubState> , ActionHandler<GithubAction> (source)

Cross-platform downloader for updates served by GitHub.

To allow this Cross-platform behavior work we split up the UI from the Viewmodel, and the Viewmodel from the installer.

UI:          Renders the current viewmodel state
Viewmodel: Searches for updates on GitHub
AppUpdater: Installs the update from the raw GitHub url

UI -(onAction)-> Viewmodel -(invokes)-> AppUpdater
<---(state)---/ <--(callback)--/

Constructors

Link copied to clipboard
constructor(remoteUserName: String, remoteRepository: String, remotePrereleaseTag: String, remoteContentType: String, versionName: String, isPrerelease: Boolean, isDebug: Boolean, buildSha: String, settings: AppSettings, updater: AppUpdater)

Properties

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
val settings: AppSettings
Link copied to clipboard
open override val state: StateFlow<GithubState>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
Link copied to clipboard
open override fun onAction(action: GithubAction)
Link copied to clipboard
@EmptySuper
protected open fun onCleared()
Link copied to clipboard
open override fun updateState(reducer: GithubState.() -> GithubState)