diff options
Diffstat (limited to 'src/net/cbaines/suma/BusStopOverlay.java')
-rw-r--r-- | src/net/cbaines/suma/BusStopOverlay.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/cbaines/suma/BusStopOverlay.java b/src/net/cbaines/suma/BusStopOverlay.java index 7894be2..4705d1d 100644 --- a/src/net/cbaines/suma/BusStopOverlay.java +++ b/src/net/cbaines/suma/BusStopOverlay.java @@ -246,7 +246,7 @@ public class BusStopOverlay extends Overlay implements RouteColorConstants, Pref SharedPreferences favouritesPreferences = context.getSharedPreferences(FAVOURITES_PREFERENCES, 0); if (favouritesPreferences.getBoolean(busStop.id, false)) { - favouritesPreferences.edit().putBoolean(busStop.id, false).commit(); + favouritesPreferences.edit().remove(busStop.id).commit(); if (context.activityToast == null) { context.activityToast = Toast.makeText(context, busStop.id + " removed from favourites", Toast.LENGTH_SHORT); @@ -267,6 +267,8 @@ public class BusStopOverlay extends Overlay implements RouteColorConstants, Pref favouritesPreferences.edit().putBoolean(busStop.id, true).commit(); } + Collections.sort(busStops, new POIFavouriteComparator(context.getSharedPreferences(FAVOURITES_PREFERENCES, 0))); + mapView.invalidate(); return true; |