Refactor favorite points

This commit is contained in:
Victor Shcherb 2020-01-06 19:11:01 +01:00
parent 4b23864c27
commit be26a0e5b2
2 changed files with 5 additions and 5 deletions

View file

@ -148,7 +148,7 @@ public class FavouritePoint implements Serializable, LocationPoint {
} }
public String getCategoryDisplayName(@NonNull Context ctx) { public String getCategoryDisplayName(@NonNull Context ctx) {
return FavouritesDbHelper.FavoriteGroup.getDisplayName(ctx); return FavouritesDbHelper.FavoriteGroup.getDisplayName(category, ctx);
} }
public void setCategory(String category) { public void setCategory(String category) {

View file

@ -67,10 +67,10 @@ public class FavouritesDbHelper {
public static class FavoriteGroup { public static class FavoriteGroup {
public static final String PERSONAL_CATEGORY = "personal"; public static final String PERSONAL_CATEGORY = "personal";
public String name; protected String name;
public boolean visible = true; protected boolean visible = true;
public int color; protected int color;
public List<FavouritePoint> points = new ArrayList<>(); protected List<FavouritePoint> points = new ArrayList<>();
public boolean isPersonal() { public boolean isPersonal() {
return isPersonal(name); return isPersonal(name);