Created
March 7, 2020 11:42
-
-
Save PatilShreyas/d1f8bb1d2f15827c3c03a284fdb6c370 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun changeQuery() { | |
| val newQuery = mBaseQuery | |
| .orderByChild("timestamp") | |
| .limitToLast(100) | |
| // Make new options | |
| val newOptions = FirebaseRecyclerOptions.Builder<Post>() | |
| .setQuery(newQuery, Post::class.java) | |
| .build() | |
| // Change options of adapter. | |
| mAdapter.updateOptions(newOptions) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment