This commit is contained in:
jimiatnymbl 2022-01-09 07:56:10 -07:00
parent 572963e28f
commit 55d7346be1
4 changed files with 11 additions and 5 deletions

View File

@ -28,11 +28,13 @@ sub loadProgramDetails()
program.programIndex = programIndex
program.fullyLoaded = true
' Are we currently recording this program?
if program.json.TimerId <> invalid
if program.json.TimerId <> invalid and program.json.TimerId <> ""
' This is needed here because the callee (onProgramDetailsLoaded) replaces the grid item with
' this newly created item from the server, without this, the red icon
' disappears when the user focuses on the program in question
program.hdSmallIconUrl = "pkg:/images/red.png"
else
program.hdSmallIconUrl = invalid
end if
m.top.programDetails = program

View File

@ -33,8 +33,10 @@ sub loadSchedule()
program = createObject("roSGNode", "ScheduleProgramData")
program.json = item
' Are we currently recording this program?
if program.json.TimerId <> invalid
if program.json.TimerId <> invalid and program.json.TimerId <> ""
program.hdSmallIconUrl = "pkg:/images/red.png"
else
program.hdSmallIconUrl = invalid
end if
results.push(program)
end for

View File

@ -32,6 +32,7 @@ sub RecordOrCancelProgram()
end if
resp = APIRequest(url)
postJson(resp, FormatJson(data))
m.top.programDetails.hdSmallIconUrl = "pkg:/images/red.png"
else
' Error msg to user?
print "Error getting Live TV Defaults from Server"
@ -46,6 +47,7 @@ sub RecordOrCancelProgram()
end if
resp = APIRequest(url)
deleteVoid(resp)
m.top.programDetails.hdSmallIconUrl = invalid
end if
end if

View File

@ -196,8 +196,6 @@ sub onRecordChannelSelected()
m.RecordProgramTask.recordSeries = false
m.RecordProgramTask.observeField("recordOperationDone", "onRecordOperationDone")
m.RecordProgramTask.control = "RUN"
m.scheduleGrid.showLoadingDataFeedback = false
end sub
' Handle user selecting "Record Series" from Program Details
@ -217,7 +215,9 @@ sub onRecordSeriesChannelSelected()
end sub
sub onRecordOperationDone()
m.scheduleGrid.showLoadingDataFeedback = false
if m.LoadScheduleTask.state <> "run"
m.LoadScheduleTask.control = "RUN"
end if
end sub
' As user scrolls grid, check if more data requries to be loaded