File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929' onCurrentTimeTimerFire: Code that runs every time the currentTimeTimer fires
3030'
3131sub updateTime()
32+ if m.hideClock then return
33+
3234 currentTime = CreateObject("roDateTime")
3335 currentTime.ToLocalTime()
3436 m.currentTimeTimer.duration = 60 - currentTime.GetSeconds()
Original file line number Diff line number Diff line change 3535 overhang.isLogoVisible = true
3636 overhang.currentUser = m.global.session.user.name
3737 overhang.title = tr("Home")
38+
39+ if not m.global.session.user.settings["ui.design.hideclock"]
40+ clock = overhang.findNode("clock")
41+ clock.visible = true
42+ end if
3843 end if
3944
4045 if isValid(m.top.lastFocus)
Original file line number Diff line number Diff line change 1515 m.progressBar = m.top.findNode("progressBar")
1616 m.progressBarBackground = m.top.findNode("progressBarBackground")
1717 m.clock = m.top.findNode("clock")
18- m.isFirstRun = true
1918
20- m.clock.observeField("minutes", "setEndsAtText")
19+ if isValid(m.clock)
20+ m.clock.observeField("minutes", "setEndsAtText")
21+ end if
2122 m.top.observeField("json", "setFields")
2223 m.top.observeField("visible", "onVisibleChanged")
2324 m.top.observeField("hasFocus", "onFocusChanged")
2425 m.top.observeField("progressPercentage", "onProgressPercentageChanged")
2526 m.top.observeField("playbackState", "onPlaybackStateChanged")
2627
28+ m.isFirstRun = true
2729 m.defaultButtonIndex = 1
2830 m.focusedButtonIndex = 1
2931 m.subtitleDividerCount = 0
166168end sub
167169
168170sub setEndsAtText()
171+ if m.global.session.user.settings["ui.design.hideclock"]
172+ endsAtText = m.top.findNode("endsAtText")
173+ endsAtText.visible = false
174+ m.endsAtTime.text = ""
175+ return
176+ end if
177+
169178 date = CreateObject("roDateTime")
170179 endTime = int(m.top.remainingPositionTime)
171180 date.fromSeconds(date.asSeconds() + endTime)
You can’t perform that action at this time.
0 commit comments