Skip to content

Commit

Permalink
seemingly reverted real-time requests to stable state
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPassa committed Jan 6, 2023
1 parent 4d0983c commit a3b60df
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected void getRequestsRealTime() {
RequestModel addedRequestModel = RequestModel.getRequestModel(doc.getDocument().toObject(RequestModel.class).getType(), doc.getDocument());
requests.add(doc.getNewIndex(), addedRequestModel);
ids.add(newId);
adapter.notifyItemInserted(doc.getNewIndex());
// adapter.notifyItemInserted(doc.getNewIndex());
getUserByRequest(addedRequestModel, doc.getNewIndex());
}
break;
Expand Down Expand Up @@ -151,8 +151,8 @@ protected void getUserByRequest(RequestModel r, int position) {
if (task.isSuccessful()) {
UserModel u = task.getResult().toObject(UserModel.class);
r.setOtherUser(u);
// adapter.notifyItemInserted(position);
adapter.notifyItemChanged(position);
adapter.notifyItemInserted(position);
// adapter.notifyItemChanged(position);
if (!requests.isEmpty()) {
recyclerView.scrollToPosition(0);
}
Expand Down

0 comments on commit a3b60df

Please sign in to comment.