refactor(ui): compose resources, domain layer (#4628)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-02-22 21:39:50 -06:00 committed by GitHub
parent 96adc70401
commit 2676a51647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
322 changed files with 3031 additions and 2790 deletions

View file

@ -67,9 +67,11 @@ constructor(
// 1. Emit cached data first, regardless of staleness.
// This gives the UI something to show immediately.
val cachedRelease = localDataSource.getLatestRelease(releaseType)
cachedRelease?.let {
Logger.d { "Emitting cached firmware for $releaseType (isStale=${it.isStale()})" }
emit(it.asExternalModel())
if (cachedRelease != null) {
Logger.d { "Emitting cached firmware for $releaseType (isStale=${cachedRelease.isStale()})" }
emit(cachedRelease.asExternalModel())
} else {
emit(null)
}
// 2. If the cache was fresh and we are not forcing a refresh, we're done.