Created
August 2, 2022 18:22
-
-
Save ifucolo/8b6b8987d0198dc622102b19654d6063 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun getJobs(): Flow<List<AndroidJob>> { | |
return jobsDao.getJobs().map { jobs -> | |
jobs.map(AndroidJobCache::asExternalModel) | |
}.onEach { | |
if (it.isEmpty()) { | |
fetchFreshJobs() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment