Compare commits

...

2 Commits

Author SHA1 Message Date
22da30eaa8 Remove unnecessary call to api 2022-09-30 13:17:40 +02:00
79fd115f5e Only return new cached items 2022-09-30 13:16:42 +02:00
2 changed files with 2 additions and 4 deletions

View File

@ -163,7 +163,6 @@ class LoginActivity : AppCompatActivity(), DIAware {
CoroutineScope(Dispatchers.IO).launch {
val result = repository.login()
if (result) {
repository.updateApiVersion()
goToMain()
} else {
CoroutineScope(Dispatchers.Main).launch {

View File

@ -457,9 +457,8 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
val newItems = getMaxItemsForBackground(ItemType.UNREAD)
val allItems = getMaxItemsForBackground(ItemType.ALL)
val starredItems = getMaxItemsForBackground(ItemType.STARRED)
val fullItemsList = newItems + allItems + starredItems
insertDBItems(fullItemsList)
return fullItemsList
insertDBItems(newItems + allItems + starredItems)
return newItems
} catch (e: Throwable) {
// We do nothing
}