Fix loading placeholder being stuck in timeline indefinitely.
When top status in TL is deleted and another one is added we get a placeholder. We were not sending update after removing this placeholder correctly. This does not fix the fact that removed statuses is still in timeline.
This commit is contained in:
parent
34a16c1f25
commit
357250f6d5
|
@ -610,6 +610,10 @@ class TimelineViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* "full" in a sense that we get as many statuses as we requested, meaning there might be more
|
||||
* still.
|
||||
*/
|
||||
private fun isFullFetch(statuses: List<TimelineStatus>) = statuses.size >= LOAD_AT_ONCE
|
||||
|
||||
private fun fullyRefresh(): Job {
|
||||
|
@ -674,6 +678,7 @@ class TimelineViewModel @Inject constructor(
|
|||
statuses.removeAt(pos)
|
||||
}
|
||||
if (newStatuses.isEmpty()) {
|
||||
triggerViewUpdate()
|
||||
return
|
||||
}
|
||||
val newViewData = newStatuses
|
||||
|
|
Loading…
Reference in New Issue