Prevent crash

This commit is contained in:
M66B 2020-09-28 22:14:22 +02:00
parent 0ea31723a5
commit 96e16b01e6
1 changed files with 10 additions and 1 deletions

View File

@ -5288,7 +5288,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (collapse_multiple && expanded > 0 && count > 1) {
values.get("expanded").clear();
updateExpanded();
adapter.notifyDataSetChanged();
rvMessage.post(new Runnable() {
@Override
public void run() {
try {
adapter.notifyDataSetChanged();
} catch (Throwable ex) {
Log.e(ex);
}
}
});
return true;
}