Prevent crash

This commit is contained in:
M66B 2020-09-28 22:15:31 +02:00
parent 96e16b01e6
commit 650f7ac85e
1 changed files with 14 additions and 1 deletions

View File

@ -5410,7 +5410,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
else if (ACTION_DECRYPT.equals(action))
onDecrypt(intent);
else if (ACTION_KEYWORDS.equals(action))
adapter.notifyDataSetChanged();
onKeywords(intent);
}
}
};
@ -5532,6 +5532,19 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
}
private void onKeywords(Intent intent) {
rvMessage.post(new Runnable() {
@Override
public void run() {
try {
adapter.notifyDataSetChanged();
} catch (Throwable ex) {
Log.e(ex);
}
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);