show opens tomorrow if works later

This commit is contained in:
veliymolfar 2020-06-30 15:41:40 +03:00
parent 5ed7ba037f
commit 36008e7879
2 changed files with 7 additions and 1 deletions

View file

@ -389,6 +389,10 @@ public class OpeningHoursParser {
return openingTime; return openingTime;
} }
public String getOpeningTomorrow(Calendar calendar) {
return getOpeningTomorrow(calendar, ALL_SEQUENCES);
}
public String getOpeningDay(Calendar calendar, int sequenceIndex) { public String getOpeningDay(Calendar calendar, int sequenceIndex) {
Calendar cal = (Calendar) calendar.clone(); Calendar cal = (Calendar) calendar.clone();
String openingTime = ""; String openingTime = "";

View file

@ -413,7 +413,9 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
timeLayout.setVisibility(View.VISIBLE); timeLayout.setVisibility(View.VISIBLE);
timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_time_16, colorId)); timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_time_16, colorId));
timeText.setTextColor(app.getResources().getColor(colorId)); timeText.setTextColor(app.getResources().getColor(colorId));
String rt = amenity.isClosed() ? app.getResources().getString(R.string.poi_operational_status_closed) : rs.getCurrentRuleTime(inst); String rt = amenity.isClosed()
? app.getResources().getString(R.string.poi_operational_status_closed)
: worksNow ? rs.getCurrentRuleTime(inst) : app.getString(R.string.will_open_tomorrow_at) + " " + rs.getOpeningTomorrow(inst);
timeText.setText(rt == null ? "" : rt); timeText.setText(rt == null ? "" : rt);
} else { } else {
timeLayout.setVisibility(View.GONE); timeLayout.setVisibility(View.GONE);