Auto expand outgoing messages

This commit is contained in:
M66B 2020-06-22 22:13:16 +02:00
parent 7ee724acc9
commit 627bf6b8c3
2 changed files with 9 additions and 0 deletions

View File

@ -5325,6 +5325,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.ascending = ascending;
}
boolean getAscending() {
return ascending;
}
void setFilterDuplicates(boolean filter_duplicates) {
if (this.filter_duplicates != filter_duplicates) {
this.filter_duplicates = filter_duplicates;

View File

@ -4215,6 +4215,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
expand = see;
else if (messages.size() == 1)
expand = messages.get(0);
else if (messages.size() > 0) {
TupleMessageEx first = messages.get(adapter.getAscending() ? messages.size() - 1 : 0);
if (first != null && EntityFolder.OUTBOX.equals(first.folderType))
expand = first;
}
if (expand != null &&
(expand.content || unmetered || (expand.size != null && expand.size < download)))