This commit is contained in:
Alex Sytnyk 2018-07-18 13:21:43 +03:00
parent aeaf87e230
commit 95cdc88e94

View file

@ -476,7 +476,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} }
} }
return open ? R.color.ctx_menu_amenity_opened_text_color : R.color.ctx_menu_amenity_closed_text_color; return open ? R.color.ctx_menu_amenity_opened_text_color : R.color.ctx_menu_amenity_closed_text_color;
} else if (indexItem != null) { } else if (shouldShowMapSize()) {
return R.color.icon_color; return R.color.icon_color;
} }
return 0; return 0;
@ -507,7 +507,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} }
return infoStr; return infoStr;
} else if (indexItem != null) { } else if (shouldShowMapSize()) {
return mapActivity.getString(R.string.file_size_in_mb, indexItem.getArchiveSizeMB()); return mapActivity.getString(R.string.file_size_in_mb, indexItem.getArchiveSizeMB());
} }
} }
@ -518,12 +518,16 @@ public abstract class MenuController extends BaseMenuController implements Colla
public int getAdditionalInfoIconRes() { public int getAdditionalInfoIconRes() {
if (openingHoursInfo != null) { if (openingHoursInfo != null) {
return R.drawable.ic_action_opening_hour_16; return R.drawable.ic_action_opening_hour_16;
} else if (indexItem != null) { } else if (shouldShowMapSize()) {
return R.drawable.ic_sdcard_16; return R.drawable.ic_sdcard_16;
} }
return 0; return 0;
} }
private boolean shouldShowMapSize() {
return indexItem != null && !downloaded;
}
@NonNull @NonNull
public String getCommonTypeStr() { public String getCommonTypeStr() {
return ""; return "";