made list managers load on mainactivity oncreate

This commit is contained in:
Sem van der Hoeven
2020-12-17 13:53:00 +01:00
parent 74fb4440ed
commit 95a2e4e849
2 changed files with 3 additions and 2 deletions

View File

@@ -32,8 +32,11 @@ public class MainActivity extends AppCompatActivity {
bottomNav.setOnNavigationItemSelectedListener(navListener);
LocationListManager.INSTANCE.setContext(this);
LocationListManager.INSTANCE.load();
CouponListManager.INSTANCE.setContext(this);
CouponListManager.INSTANCE.load();
RouteListManager.INSTANCE.setContext(this);
RouteListManager.INSTANCE.load();
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, new HomeFragment()).commit();
}

View File

@@ -100,8 +100,6 @@ public class HomeFragment extends Fragment {
// add location manager and set the start point
LocationManager locationManager = (LocationManager) requireActivity().getSystemService(Context.LOCATION_SERVICE);
LocationListManager.INSTANCE.load();
try {
Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);