mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Create new ContributionController before NearbyAdapterFactory is initiated
This commit is contained in:
parent
863eee64dd
commit
87cd8eecab
1 changed files with 1 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ public class NearbyListFragment extends DaggerFragment {
|
||||||
View view = inflater.inflate(R.layout.fragment_nearby, container, false);
|
View view = inflater.inflate(R.layout.fragment_nearby, container, false);
|
||||||
recyclerView = view.findViewById(R.id.listView);
|
recyclerView = view.findViewById(R.id.listView);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
controller = new ContributionController(this);
|
||||||
adapterFactory = new NearbyAdapterFactory(this, controller);
|
adapterFactory = new NearbyAdapterFactory(this, controller);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
@ -70,8 +71,6 @@ public class NearbyListFragment extends DaggerFragment {
|
||||||
// Check that this is the first time view is created,
|
// Check that this is the first time view is created,
|
||||||
// to avoid double list when screen orientation changed
|
// to avoid double list when screen orientation changed
|
||||||
List<Place> placeList = Collections.emptyList();
|
List<Place> placeList = Collections.emptyList();
|
||||||
controller = new ContributionController(this);
|
|
||||||
|
|
||||||
Bundle bundle = this.getArguments();
|
Bundle bundle = this.getArguments();
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
String gsonPlaceList = bundle.getString("PlaceList", "[]");
|
String gsonPlaceList = bundle.getString("PlaceList", "[]");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue