Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@RocketChat/android
Closes #ISSUE_NUMBER
#321
https://forums.rocket.chat/t/android-preload-chats-and-show-them-instantly/2628
https://open.rocket.chat/channel/immediate_message_load_in_room
Changes: [Add here what changes were made in this issue and if possible provide links.]
Changed the loading of moderator roles until after the room loads up so it does not block the loading of the ui. There isn't actually anything that uses the moderator roles right now, so i am leaving it to the implementer of that on how to best handle the delayed information. I wanted to make sure the functionality was the same after the changes though rather than just deleting it.
Update 4/30/2019:
Fixed two more issues: …
recycler_view was adding its adapter in showMessages this was causing the error: "E/RecyclerView: No adapter attached; skipping layout"
This seems to be the cause of a missed update step and ui delay. Code to add adapter was added to setupRecyclerView, which is called in the onViewCreated function.
loadActiveMembers function was being called from ChatRoomFragment object and the network / data access was being done in the UI thread. Moved the function call from the end of the function loadMessages to just after the end of said function.
Changed the function loadActiveMembers to do most of its work in an I.O. thread and just the view updating in a UI thread.
Screenshots or GIF for the change: