From 24c10d51ac9ead094bc830998c66ddc55c93cdb3 Mon Sep 17 00:00:00 2001 From: torque Date: Tue, 4 Mar 2025 19:28:55 -0700 Subject: [PATCH] thumbnail: clear cached border drawing if thumbfast becomes disabled 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. --- src/Thumbnail.moon | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Thumbnail.moon b/src/Thumbnail.moon index 8ba1a7f..4f32128 100644 --- a/src/Thumbnail.moon +++ b/src/Thumbnail.moon @@ -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! @@ -23,6 +23,8 @@ class Thumbnail extends BarAccent updateInfo: ( thumbfastInfo ) => @thumbfast = thumbfastInfo @lastX = -1 + if @thumbfast.disabled + @line[4] = "" @needsUpdate = true reconfigure: =>