Commit 0647578c authored by Volker Krause's avatar Volker Krause
Browse files

Use new API from KOpeningHours for showing a current state description

parent c899b631
......@@ -30,24 +30,7 @@ Column {
property var currentInterval: root.oh.interval(new Date())
id: currentState
text: {
if (oh.error != OpeningHours.NoError) {
return "";
/* TODO if (i.end) Math.round((i.end - + " more minutes."; */
switch (currentInterval.state) {
case Interval.Open:
return "Currently open";
case Interval.Closed:
return "Currently closed";
case Interval.Unknown:
case Interval.Invalid:
return "";
text: intervalModel.currentState // TODO we could update this every minute
color: {
switch (currentInterval.state) {
case Interval.Open: return Kirigami.Theme.positiveTextColor;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment