Updated on 2026-08-14
This commit is contained in:
parent
c92c071b79
commit
7f7060a547
1 changed files with 3 additions and 2 deletions
|
|
@ -85,9 +85,10 @@ internal class DefaultNewsRepository(
|
|||
articlesToUpdate.map { article ->
|
||||
val isViewed = viewedFlags[article.id] == true
|
||||
article.copy(viewed = isViewed)
|
||||
}.sortedBy { it.viewed }.right()
|
||||
}.sortedBy { it.viewed }
|
||||
}
|
||||
.catch { it.left() }
|
||||
.map<List<ShortArticle>, Either<Throwable, List<ShortArticle>>> { it.right() }
|
||||
.catch { emit(it.left()) }
|
||||
}
|
||||
|
||||
override fun observeDetailedArticles(): Flow<Map<Int, DetailedArticle>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue