Skip to content

Commit

Permalink
thumbnail: clear cached border drawing if thumbfast becomes disabled
Browse files Browse the repository at this point in the history
For example, when playing a playlist that started with a local file and
then switched to a network file, the border box would stop updating,
but it would still be drawn.

Also change the defaults so it does not emit invalid ASS to start with,
though some of the other widgets may still do this.
  • Loading branch information
torque committed Mar 5, 2025
1 parent 62e0561 commit 24c10d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Thumbnail.moon
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class Thumbnail extends BarAccent
new: ( thumbfastInfo ) =>
@line = {
[[{\pos(]] -- 1
0 -- 2
[[0,0]] -- 2
boxStyle\format settings['default-style'], settings['thumbnail-border-style']
0 -- 4
[[]] -- 4
}

super!
Expand All @@ -23,6 +23,8 @@ class Thumbnail extends BarAccent
updateInfo: ( thumbfastInfo ) =>
@thumbfast = thumbfastInfo
@lastX = -1
if @thumbfast.disabled
@line[4] = ""
@needsUpdate = true

reconfigure: =>
Expand Down

0 comments on commit 24c10d5

Please sign in to comment.