Skip to content

Commit

Permalink
make sure tasks are stopped when using PhotoDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Nov 13, 2023
1 parent 88bc02b commit 0ce789a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/photos/PhotoDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ sub statusUpdate()
m.hideStatusAnimation.control = "start"
end sub

' JFScreen hook.
' Used to ensure tasks are stopped
sub OnScreenHidden()
m.slideshowTimer.control = "stop"
m.statusTimer.control = "stop"
end sub

function onKeyEvent(key as string, press as boolean) as boolean
if not press then return false

Expand Down
2 changes: 1 addition & 1 deletion components/photos/PhotoDetails.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="PhotoDetails" extends="JFGroup">
<component name="PhotoDetails" extends="JFScreen">
<children>
<Poster id="photo" width="1920" height="1080" loadDisplayMode="scaleToFit" />
<Rectangle id="background" color="0x101010EE" height="120" width="500" Translation="[700, -150]" opacity="0">
Expand Down

0 comments on commit 0ce789a

Please sign in to comment.