diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index e2c8a31034..d063b975d9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -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);