Implemented conversation search.

You can now search for messages within a specific conversation.
This commit is contained in:
Greyson Parrelli
2019-02-01 09:06:59 -08:00
parent 10631d7e71
commit 9f04c28bfd
27 changed files with 965 additions and 152 deletions

View File

@@ -124,6 +124,10 @@ public abstract class CursorRecyclerViewAdapter<VH extends RecyclerView.ViewHold
+ (hasFooterView() ? 1 : 0);
}
public int getCursorCount() {
return cursor.getCount();
}
@SuppressWarnings("unchecked")
@Override
public final void onViewRecycled(ViewHolder holder) {
@@ -190,7 +194,7 @@ public abstract class CursorRecyclerViewAdapter<VH extends RecyclerView.ViewHold
throw new IllegalStateException("this should only be called when the cursor is valid");
}
if (!cursor.moveToPosition(getCursorPosition(position))) {
throw new IllegalStateException("couldn't move cursor to position " + position);
throw new IllegalStateException("couldn't move cursor to position " + position + " (actual cursor position " + getCursorPosition(position) + ")");
}
return cursor;
}