Merge pull request #8218 from osmandapp/personal_favs_refactor
Fix category does'n created, align text with direction marker.
This commit is contained in:
commit
d06aa25cd6
2 changed files with 5 additions and 5 deletions
|
@ -72,8 +72,9 @@
|
|||
android:id="@+id/direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_direction_arrow"/>
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/ic_direction_arrow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
|
|
|
@ -577,13 +577,12 @@ public class FavouritesDbHelper {
|
|||
}
|
||||
|
||||
public void addEmptyCategory(String name, int color) {
|
||||
if (FavoriteGroup.isPersonalCategoryDisplayName(context,name))
|
||||
addEmptyCategory(name, color, true);
|
||||
}
|
||||
|
||||
public void addEmptyCategory(String name, int color, boolean visible) {
|
||||
FavoriteGroup group = new FavoriteGroup();
|
||||
group.name = name;
|
||||
group.name = FavoriteGroup.convertDisplayNameToGroupIdName(context, name);
|
||||
group.color = color;
|
||||
group.visible = visible;
|
||||
favoriteGroups.add(group);
|
||||
|
@ -621,7 +620,7 @@ public class FavouritesDbHelper {
|
|||
public boolean groupExists(String name) {
|
||||
String nameLowercase = name.toLowerCase();
|
||||
for (String groupName : flatGroups.keySet()) {
|
||||
if (groupName.toLowerCase().equals(nameLowercase)) {
|
||||
if (groupName.toLowerCase().equals(nameLowercase) || FavoriteGroup.getDisplayName(context, groupName).equals(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue