Fix repository.tags() returning null
This commit is contained in:
@ -143,13 +143,13 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
|
||||
return success
|
||||
}
|
||||
|
||||
suspend fun getTags(): List<SelfossModel.Tag>? {
|
||||
suspend fun getTags(): List<SelfossModel.Tag> {
|
||||
return if (isNetworkAvailable()) {
|
||||
val apiTags = api.tags()
|
||||
if (apiTags.success && apiTags.data != null && (appSettingsService.isItemCachingEnabled() || !appSettingsService.isUpdateSourcesEnabled())) {
|
||||
resetDBTagsWithData(apiTags.data)
|
||||
}
|
||||
apiTags.data
|
||||
apiTags.data ?: emptyList()
|
||||
} else {
|
||||
getDBTags().map { it.toView() }
|
||||
}
|
||||
|
Reference in New Issue
Block a user