Prevent crash

pull/185/head
M66B 4 years ago
parent 96e16b01e6
commit 650f7ac85e

@ -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);

Loading…
Cancel
Save