mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(ui): compose resources, domain layer (#4628)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
96adc70401
commit
2676a51647
322 changed files with 3031 additions and 2790 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue