File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
frameos/src/apps/data/eventsToAgenda Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,17 @@ proc get*(self: App, context: ExecutionContext): string =
41
41
proc h1 (text: string ): string = & " { title} { text} \n { normal} \n "
42
42
proc formatDay (day: string ): string = format (parseTs (" {year/4}-{month/2}-{day/2}" , day), titleFormat)
43
43
44
+ let noEvents = events == nil or events.kind != JArray or events.len == 0
45
+
44
46
result = " "
45
47
46
48
var currentDay = " "
47
- if self.appConfig.startWithToday:
49
+ if self.appConfig.startWithToday or noEvents :
48
50
let todayTs = epochTime ().Timestamp
49
51
result &= h1 (format (todayTs, titleFormat, tzName = timezone))
50
52
currentDay = format (todayTs, " {year/4}-{month/2}-{day/2}" , tzName = timezone)
51
53
52
- if events == nil or events.kind != JArray or events.len == 0 :
54
+ if noEvents :
53
55
result &= & " No events found\n "
54
56
return
55
57
You can’t perform that action at this time.
0 commit comments