Update explore fragment
This commit is contained in:
@@ -10,7 +10,6 @@ import org.koitharu.kotatsu.core.db.entity.toMangaTags
|
||||
import org.koitharu.kotatsu.core.util.ext.mapItems
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.suggestions.data.SuggestionEntity
|
||||
import org.koitharu.kotatsu.suggestions.data.SuggestionWithManga
|
||||
import javax.inject.Inject
|
||||
|
||||
class SuggestionRepository @Inject constructor(
|
||||
@@ -29,8 +28,10 @@ class SuggestionRepository @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getRandom(): SuggestionWithManga? {
|
||||
return db.suggestionDao.getRandom()
|
||||
suspend fun getRandom(): Manga? {
|
||||
return db.suggestionDao.getRandom()?.let {
|
||||
it.manga.toManga(it.tags.toMangaTags())
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun clear() {
|
||||
|
||||
Reference in New Issue
Block a user