From 09ba4b8da3ff7da0a2eef9cdb4205469949d3946 Mon Sep 17 00:00:00 2001 From: crimean Date: Wed, 10 Apr 2019 17:10:41 +0300 Subject: [PATCH] Fix #6395 --- OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index d5b80bc07b..5a2f042fa7 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -413,7 +413,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { if (rs != null) { Calendar inst = Calendar.getInstance(); inst.setTimeInMillis(System.currentTimeMillis()); - boolean worksNow = rs.isOpenedForTime(inst); + boolean worksNow = !amenity.isClosed() && rs.isOpenedForTime(inst); inst.setTimeInMillis(System.currentTimeMillis() + 30 * 60 * 1000); // 30 minutes later boolean worksLater = rs.isOpenedForTime(inst); int colorId = worksNow ? worksLater ? R.color.color_ok : R.color.color_intermediate : R.color.color_warning; @@ -421,7 +421,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { timeLayout.setVisibility(View.VISIBLE); timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_small_time, colorId)); timeText.setTextColor(app.getResources().getColor(colorId)); - String rt = rs.getCurrentRuleTime(inst); + String rt = amenity.isClosed() ? app.getResources().getString(R.string.poi_operational_status_closed) : rs.getCurrentRuleTime(inst); timeText.setText(rt == null ? "" : rt); } else { timeLayout.setVisibility(View.GONE);