Fix potential crashes

This commit is contained in:
Thomas 2023-01-04 11:12:17 +01:00
parent 299df2cd59
commit 785257cc6c
2 changed files with 4 additions and 1 deletions

View file

@ -143,6 +143,9 @@ public class SpannableHelper {
int start = content.getSpanStart(span);
int end = content.getSpanEnd(span);
if (start < 0 || end > content.length()) {
continue;
}
content.removeSpan(span);
//Get the matching word associated to the URL
String word = content.subSequence(start, end).toString();

View file

@ -313,7 +313,7 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
notification.filteredByApp = null;
notifyItemChanged(position);
});
} else {
} else if (notification.status != null) {
StatusAdapter.StatusViewHolder holderStatus = (StatusAdapter.StatusViewHolder) viewHolder;
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
if (sharedpreferences.getBoolean(context.getString(R.string.SET_CARDVIEW), false)) {