Fallback once

This commit is contained in:
M66B 2020-06-29 19:29:06 +02:00
parent 3edbd3d394
commit a245ed28da
1 changed files with 6 additions and 0 deletions

View File

@ -255,6 +255,7 @@ public class ViewModelMessages extends ViewModel {
Log.d("Observe previous/next id=" + id);
model.list.observe(owner, new Observer<PagedList<TupleMessageEx>>() {
private boolean fallback = false;
@Override
public void onChanged(PagedList<TupleMessageEx> messages) {
@ -283,6 +284,11 @@ public class ViewModelMessages extends ViewModel {
Log.w("Observe previous/next gone id=" + id);
if (fallback)
return;
fallback = true;
Bundle args = new Bundle();
args.putLong("id", id);