You need to sign in or sign up before continuing.
Commit 0011cbf8 authored by Varun Patil's avatar Varun Patil

Prevent creation of new adapter on refresh in feed

parent 538eb8f5
......@@ -159,8 +159,9 @@ public class FeedFragment extends BaseFragment {
events.get(0).setEventBigImage(true);
}
// Initialize adapter
if (feedAdapter == null) {
feedAdapter = new FeedAdapter(events, this);
getActivityBuffer().safely(new ActivityBuffer.IRunnable() {
@Override
public void run(Activity pActivity) {
......@@ -173,6 +174,11 @@ public class FeedFragment extends BaseFragment {
}
}
});
} else {
feedAdapter.setEvents(events);
feedAdapter.notifyDataSetChanged();
}
View view = getActivity().findViewById(R.id.loadingPanel);
if (view != null)
view.setVisibility(View.GONE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment