1
0
mirror of https://github.com/accelforce/Yuito synced 2024-12-25 07:16:24 +01:00

fix placeholder not disappearing when no statuses are loaded (#2305)

This commit is contained in:
Konrad Pozniak 2022-02-02 18:29:59 +01:00 committed by GitHub
parent 8f5fb5b35c
commit ab6ea6dc89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,13 +162,13 @@ class CachedTimelineViewModel @Inject constructor(
)
}
if (overlappedStatuses == 0) {
if (overlappedStatuses == 0 && statuses.isNotEmpty()) {
timelineDao.insertStatus(
Placeholder(statuses.last().id.dec(), loading = false).toEntity(activeAccount.id)
)
}
}
} catch (e: java.lang.Exception) {
} catch (e: Exception) {
loadMoreFailed(placeholderId, e)
}
}