This commit is contained in:
Chumva 2018-10-18 18:06:25 +03:00
parent 484364a7cf
commit 8088290cf9
2 changed files with 14 additions and 0 deletions

View file

@ -1196,6 +1196,17 @@ public class OpeningHoursParser {
return false; return false;
} }
public boolean isOpenedEveryDay() {
boolean openedEveryDay = true;
for (int i = 0; i < 7; i++) {
if (!days[i]) {
openedEveryDay = false;
break;
}
}
return openedEveryDay;
}
@Override @Override
public String getTime(Calendar cal, boolean checkAnotherDay, int limit, boolean opening) { public String getTime(Calendar cal, boolean checkAnotherDay, int limit, boolean opening) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View file

@ -148,6 +148,9 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment
} }
public void setBasicOpeningHoursRule(BasicOpeningHourRule item, int position) { public void setBasicOpeningHoursRule(BasicOpeningHourRule item, int position) {
if (item.getStartTime() == 0 && item.getEndTime() == 0 && item.isOpenedEveryDay()) {
item.setEndTime(24 * 60);
}
mOpeningHoursAdapter.setOpeningHoursRule(item, position); mOpeningHoursAdapter.setOpeningHoursRule(item, position);
} }