mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 19:47:31 +00:00
Fix rendering issue when deleting the last message in a conversation.
This commit is contained in:
@@ -6,6 +6,7 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import org.signal.core.util.concurrent.SignalExecutors;
|
||||
import org.signal.core.util.logging.Log;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@@ -57,6 +58,11 @@ class FixedSizePagingController<E> implements PagingController {
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadState.size() == 0) {
|
||||
liveData.postValue(Collections.emptyList());
|
||||
return;
|
||||
}
|
||||
|
||||
int leftPageBoundary = (aroundIndex / config.pageSize()) * config.pageSize();
|
||||
int rightPageBoundary = leftPageBoundary + config.pageSize();
|
||||
int buffer = config.bufferPages() * config.pageSize();
|
||||
|
Reference in New Issue
Block a user