Merge pull request #9302 from osmandapp/default_days_edit_poi

Mo-Fr by default in edit poi osm
This commit is contained in:
vshcherb 2020-06-23 23:58:41 +02:00 committed by GitHub
commit d5f506f4ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -886,6 +886,12 @@ public class OpeningHoursParser {
return new TIntArrayList(endTimes); return new TIntArrayList(endTimes);
} }
public void setDays(boolean[] days) {
if (this.days.length == days.length) {
this.days = days;
}
}
/** /**
* Check if the weekday of time "cal" is part of this rule * Check if the weekday of time "cal" is part of this rule
* *

View file

@ -118,6 +118,7 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment
BasicOpeningHourRule rule = new BasicOpeningHourRule(); BasicOpeningHourRule rule = new BasicOpeningHourRule();
rule.setStartTime(9 * 60); rule.setStartTime(9 * 60);
rule.setEndTime(18 * 60); rule.setEndTime(18 * 60);
rule.setDays(new boolean[]{true, true, true, true, true, false, false});
OpeningHoursDaysDialogFragment fragment = OpeningHoursDaysDialogFragment.createInstance(rule, -1); OpeningHoursDaysDialogFragment fragment = OpeningHoursDaysDialogFragment.createInstance(rule, -1);
fragment.show(getChildFragmentManager(), "OpenTimeDialogFragment"); fragment.show(getChildFragmentManager(), "OpenTimeDialogFragment");
} }