Fix category does'n create, align text with direction marker.

This commit is contained in:
Dima-1 2020-01-13 11:12:56 +02:00
parent 3d8756459d
commit f464ae192d
2 changed files with 5 additions and 5 deletions

View file

@ -72,7 +72,8 @@
android:id="@+id/direction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_gravity="top"
android:layout_marginTop="2dp"
android:src="@drawable/ic_direction_arrow" />
<TextView

View file

@ -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;
}
}