From 928c9e60bd48dd704ae4b46ad2bd4b0b610f7fe3 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 26 Jun 2020 17:30:58 +0300 Subject: [PATCH] set Mo-Fr by default if no opening hours --- OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java index d2d34785e0..cace1be261 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java @@ -118,7 +118,9 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment BasicOpeningHourRule rule = new BasicOpeningHourRule(); rule.setStartTime(9 * 60); rule.setEndTime(18 * 60); - rule.setDays(new boolean[]{true, true, true, true, true, false, false}); + if (mOpeningHoursAdapter.openingHours.getRules().isEmpty()){ + rule.setDays(new boolean[]{true, true, true, true, true, false, false}); + } OpeningHoursDaysDialogFragment fragment = OpeningHoursDaysDialogFragment.createInstance(rule, -1); fragment.show(getChildFragmentManager(), "OpenTimeDialogFragment"); }