mirror of https://github.com/M66B/FairEmail.git
Load around selected item
This commit is contained in:
parent
19ed92c5a5
commit
0f9371f9ed
|
@ -95,14 +95,17 @@ public class ViewModelMessages extends ViewModel {
|
|||
continue;
|
||||
if (found) {
|
||||
prev = item;
|
||||
list.getValue().loadAround(i);
|
||||
break;
|
||||
}
|
||||
if (thread.equals(item.thread))
|
||||
if (thread.equals(item.thread)) {
|
||||
found = true;
|
||||
else
|
||||
list.getValue().loadAround(i);
|
||||
} else
|
||||
next = item;
|
||||
}
|
||||
if (!found)
|
||||
return new Target[]{null, null};
|
||||
|
||||
return new Target[]{
|
||||
prev == null ? null : new Target(prev.account, prev.thread, prev.id, prev.ui_found),
|
||||
next == null ? null : new Target(next.account, next.thread, next.id, next.ui_found)};
|
||||
|
|
Loading…
Reference in New Issue