Prevent spamming home refresh
This commit is contained in:
parent
aa7f478bf8
commit
e0fa6481ad
|
@ -6,6 +6,7 @@
|
|||
</children>
|
||||
<interface>
|
||||
<field id="selectedItem" alias="homeRows.selectedItem" />
|
||||
<field id="timeLastRefresh" type="integer" />
|
||||
<function name="refresh" />
|
||||
</interface>
|
||||
<script type="text/brightscript" uri="Home.brs" />
|
||||
|
|
|
@ -435,8 +435,11 @@ sub RemoveCurrentGroup()
|
|||
group.setFocus(true)
|
||||
end if
|
||||
if group.subtype() = "Home" then
|
||||
' refresh home page
|
||||
group.callFunc("refresh")
|
||||
currentTime = CreateObject("roDateTime").AsSeconds()
|
||||
if group.timeLastRefresh = invalid or (currentTime - group.timeLastRefresh) > 20 then
|
||||
group.timeLastRefresh = currentTime
|
||||
group.callFunc("refresh")
|
||||
end if
|
||||
end if
|
||||
group.visible = true
|
||||
end sub
|
||||
|
|
Loading…
Reference in New Issue
Block a user