correct display of opening hours description if there are no opening hours

This commit is contained in:
Johan von Forstner
2020-09-12 17:14:21 +02:00
parent 7d495468ea
commit 2cd9e9d642

View File

@@ -79,8 +79,11 @@ fun buildDetails(
if (loc.openinghours != null && !loc.openinghours.isEmpty) DetailsAdapter.Detail(
R.drawable.ic_hours,
R.string.hours,
loc.openinghours.getStatusText(ctx),
loc.openinghours.description,
if (loc.openinghours.days != null)
loc.openinghours.getStatusText(ctx)
else
loc.openinghours.description ?: "",
if (loc.openinghours.days != null) loc.openinghours.description else null,
hoursDays = loc.openinghours.days
) else null,
if (loc.cost != null) DetailsAdapter.Detail(