From 7828992e8025bb763c6136a0ae5d5b074c809c89 Mon Sep 17 00:00:00 2001 From: Connor Wittman Date: Tue, 19 Nov 2024 22:26:32 +0000 Subject: [PATCH] Add search_active to playstatus --- src/playstatus.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/playstatus.rs b/src/playstatus.rs index 5952ee9..bc458e6 100644 --- a/src/playstatus.rs +++ b/src/playstatus.rs @@ -11,6 +11,8 @@ pub struct PlayStatus { pub playing: bool, /// Whether or not the queue is open pub queue_open: bool, + /// Whether or not the search bar is active (useful for knowing when spacebar to play/pause, etc should be disabled) + pub search_active: bool, /// A reference to the HTML audio element pub audio_player: Option>, /// A queue of songs that have been played, ordered from oldest to newest @@ -56,6 +58,7 @@ impl Default for PlayStatus { Self { playing: false, queue_open: false, + search_active: false, audio_player: None, history: VecDeque::new(), queue: VecDeque::new(),