fix crash in NotificationsFragment (#1119)
* fix crash in NotificationsFragment * don't reload notifications * add updateAdapter()
This commit is contained in:
parent
5f390b378b
commit
08c1bbd253
2 changed files with 14 additions and 4 deletions
|
@ -207,14 +207,19 @@ public class NotificationsFragment extends SFragment implements
|
|||
adapter.setUseAbsoluteTime(useAbsoluteTime);
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
notifications.clear();
|
||||
topLoading = false;
|
||||
bottomLoading = false;
|
||||
bottomId = null;
|
||||
|
||||
((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
|
||||
updateAdapter();
|
||||
|
||||
sendFetchNotificationsRequest(null, null, FetchEnd.BOTTOM, -1);
|
||||
if (notifications.isEmpty()) {
|
||||
sendFetchNotificationsRequest(null, null, FetchEnd.BOTTOM, -1);
|
||||
} else {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue