Update check: S-22 "Check for update" always asks the server (D-140)
UpdateRepository.checkNow() (default: check(), for throttle-free fakes) skips the 6-hour throttle of the automatic check (AC-16.2) and restarts its window; AboutViewModel calls it. Debug builds still never check (AC-16.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
+3
-2
@@ -38,7 +38,8 @@ class AboutViewModel @Inject constructor(
|
||||
|
||||
/**
|
||||
* "Sök efter uppdatering" (online, FR-16): progress in the button; then the banner (Available), "Du har den
|
||||
* senaste versionen" (UpToDate, AC-16.6) or "Kunde inte nå servern" (Failed).
|
||||
* senaste versionen" (UpToDate, AC-16.6) or "Kunde inte nå servern" (Failed). Always asks the server, whatever the
|
||||
* 6-hour throttle of the automatic check says (D-140).
|
||||
*/
|
||||
fun check() {
|
||||
val s = state.value ?: return
|
||||
@@ -49,7 +50,7 @@ class AboutViewModel @Inject constructor(
|
||||
}
|
||||
local.update { it.copy(checking = true, bannerHidden = false) }
|
||||
viewModelScope.launch {
|
||||
val message = when (update.check()) {
|
||||
val message = when (update.checkNow()) {
|
||||
UpdateCheck.UpToDate -> UiMessage(R.string.settings_about_up_to_date)
|
||||
UpdateCheck.Failed -> UiMessage(DesignR.string.common_could_not_reach_server)
|
||||
is UpdateCheck.Available -> null
|
||||
|
||||
Reference in New Issue
Block a user