Limit prev/next fallback size

This commit is contained in:
M66B 2021-11-22 08:00:41 +01:00
parent 5719d793ba
commit 1abfdb7e06
1 changed files with 3 additions and 0 deletions

View File

@ -367,6 +367,9 @@ public class ViewModelMessages extends ViewModel {
for (int j = 0; j < messages.size(); j++) for (int j = 0; j < messages.size(); j++)
if (messages.get(j).id == id) if (messages.get(j).id == id)
return getPair(plist, ds, count, i + j); return getPair(plist, ds, count, i + j);
if (lpos < 0 && i == 500 && count > 1000)
i = count - 500;
} }
Log.i("Observe previous/next message not found" + Log.i("Observe previous/next message not found" +