From 492bff3e024d5475f7cd1da921800e5d531d87e9 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Wed, 26 Mar 2014 23:26:53 +0100 Subject: Allow subscription to either location or direction data The forced union of both information is not appropriate in several activities where only GPS data is needed, or where direction data update less components than location data (such as cache lists). This is part of work on #3680. --- main/src/cgeo/geocaching/MainActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/src/cgeo/geocaching/MainActivity.java') diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java index ab6256f..3295d04 100644 --- a/main/src/cgeo/geocaching/MainActivity.java +++ b/main/src/cgeo/geocaching/MainActivity.java @@ -144,7 +144,7 @@ public class MainActivity extends AbstractActivity { private int satellitesVisible = 0; @Override - public void updateGeoDir(final IGeoData data, final float dir) { + public void updateGeoData(final IGeoData data) { if (data.getGpsEnabled() == gpsEnabled && data.getSatellitesFixed() == satellitesFixed && data.getSatellitesVisible() == satellitesVisible) { @@ -215,7 +215,7 @@ public class MainActivity extends AbstractActivity { @Override public void onResume() { - super.onResume(Subscriptions.from(locationUpdater.start(), satellitesHandler.start())); + super.onResume(Subscriptions.from(locationUpdater.start(GeoDirHandler.UPDATE_GEODATA), satellitesHandler.start(GeoDirHandler.UPDATE_GEODATA))); updateUserInfoHandler.sendEmptyMessage(-1); startBackgroundLogin(); init(); @@ -508,7 +508,7 @@ public class MainActivity extends AbstractActivity { private class UpdateLocation extends GeoDirHandler { @Override - public void updateGeoDir(final IGeoData geo, final float dir) { + public void updateGeoData(final IGeoData geo) { if (!nearestView.isClickable()) { nearestView.setFocusable(true); nearestView.setClickable(true); -- cgit v1.1