From a491e905735744673cfcf07f4ec3fb6d1542c44e Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 3 Jun 2022 06:53:45 -0500 Subject: [PATCH] Correctly manage icon state when visibility is lost. --- src/sound/icon.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound/icon.rs b/src/sound/icon.rs index 65fd370..1a6cdbd 100644 --- a/src/sound/icon.rs +++ b/src/sound/icon.rs @@ -194,9 +194,10 @@ fn update( entity.remove::(); }); } + } else if !sound.paused { + sound.paused = true; + sound.restart = true; } - } else { - sound.paused = true; } } }