Skip to content

Commit

Permalink
show download progress in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Jan 6, 2024
1 parent 098cbcd commit c4abb0c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/main/java/com/geode/launcher/SettingsActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,17 @@ fun UpdateIndicator(
var enablePopup by remember { mutableStateOf(false) }

when (updateStatus) {
is ReleaseViewModel.ReleaseUIState.InUpdateCheck,
is ReleaseViewModel.ReleaseUIState.InDownload -> {
is ReleaseViewModel.ReleaseUIState.InUpdateCheck -> {
enablePopup = true
CircularProgressIndicator()
}
is ReleaseViewModel.ReleaseUIState.InDownload -> {
// is this the ideal design? idk
enablePopup = true
val progress = updateStatus.downloaded / updateStatus.outOf.toDouble()

CircularProgressIndicator(progress.toFloat())
}
else -> {}
}

Expand Down

0 comments on commit c4abb0c

Please sign in to comment.