forked from mirrors/Fedilab
Fix potential crashes
This commit is contained in:
parent
299df2cd59
commit
785257cc6c
2 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue