Always collapse multiple expanded messages

This commit is contained in:
M66B
2019-02-14 08:55:20 +00:00
parent 0904fe8caf
commit 084265a1ce
3 changed files with 40 additions and 27 deletions

View File

@@ -2478,13 +2478,14 @@ public class FragmentMessages extends FragmentBase {
return true;
}
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
if (prefs.getBoolean("collapse", false))
if (values.containsKey("expanded") && values.get("expanded").size() > 0) {
if (values.containsKey("expanded")) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
if (values.get("expanded").size() > 1 || prefs.getBoolean("collapse", false)) {
values.get("expanded").clear();
adapter.notifyDataSetChanged();
return true;
}
}
return false;
}