mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Added setting to expand all read
This commit is contained in:
@@ -1216,8 +1216,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
if ("expanded".equals(name)) {
|
||||
// Collapse other messages
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean expand_all = prefs.getBoolean("expand_all", false);
|
||||
boolean expand_one = prefs.getBoolean("expand_one", true);
|
||||
if (expand_one) {
|
||||
if (!expand_all && expand_one) {
|
||||
for (Long other : new ArrayList<>(values.get(name)))
|
||||
if (!other.equals(id)) {
|
||||
values.get(name).remove(other);
|
||||
@@ -3162,6 +3163,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
|
||||
iProperties.setValue("expanded", expand.id, true);
|
||||
}
|
||||
|
||||
boolean expand_all = prefs.getBoolean("expand_all", false);
|
||||
if (expand_all)
|
||||
for (TupleMessageEx message : messages)
|
||||
if (message != null && message.ui_seen)
|
||||
iProperties.setValue("expanded", message.id, true);
|
||||
}
|
||||
} else {
|
||||
if (autoCloseCount > 0 && (autoclose || onclose != null)) {
|
||||
|
||||
Reference in New Issue
Block a user