fix placeholder not disappearing when no statuses are loaded (#2305)
This commit is contained in:
parent
8f5fb5b35c
commit
ab6ea6dc89
|
@ -162,13 +162,13 @@ class CachedTimelineViewModel @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overlappedStatuses == 0) {
|
if (overlappedStatuses == 0 && statuses.isNotEmpty()) {
|
||||||
timelineDao.insertStatus(
|
timelineDao.insertStatus(
|
||||||
Placeholder(statuses.last().id.dec(), loading = false).toEntity(activeAccount.id)
|
Placeholder(statuses.last().id.dec(), loading = false).toEntity(activeAccount.id)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: Exception) {
|
||||||
loadMoreFailed(placeholderId, e)
|
loadMoreFailed(placeholderId, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue