Fixed inconsistent displaying of repos and improved their sorting

This commit is contained in:
Viktor De Pasquale
2019-05-25 18:09:45 +02:00
parent 8cd3b603df
commit 6a243ec7bc
3 changed files with 30 additions and 28 deletions

View File

@@ -35,6 +35,9 @@ class ModuleRepository(
}.getOrNull()
}
}
//either github apparently returns repos incorrectly or ...
//either ways this fixes duplicates
.map { it.distinctBy { it.id } }
.doOnSuccess { repoDao.insert(it) }
private fun fetchCachedOrdered() = Single.fromCallable {