@@ -230,10 +230,13 @@ pub async fn main_work<'d>(
230230 }
231231 }
232232 Event :: Event ( Event :: K0_ ) => {
233- allow_interrupt = !allow_interrupt;
234- log:: info!( "Set allow_interrupt to {}" , allow_interrupt) ;
235- gui. state = format ! ( "Interrupt: {}" , allow_interrupt) ;
236- gui. display_flush ( ) . unwrap ( ) ;
233+ #[ cfg( feature = "voice_interrupt" ) ]
234+ {
235+ allow_interrupt = !allow_interrupt;
236+ log:: info!( "Set allow_interrupt to {}" , allow_interrupt) ;
237+ gui. state = format ! ( "Interrupt: {}" , allow_interrupt) ;
238+ gui. display_flush ( ) . unwrap ( ) ;
239+ }
237240 }
238241 Event :: Event ( Event :: VOL_UP ) => {
239242 vol += 1 ;
@@ -262,11 +265,11 @@ pub async fn main_work<'d>(
262265 Event :: Event ( Event :: YES | Event :: K1 ) => { }
263266 Event :: Event ( Event :: IDLE ) => {
264267 log:: info!( "Received idle event" ) ;
265- if state == State :: Listening {
266- state = State :: Idle ;
267- gui. state = "Idle" . to_string ( ) ;
268- gui. display_flush ( ) . unwrap ( ) ;
269- server. close ( ) . await ?;
268+ if state == State :: Listening {
269+ state = State :: Idle ;
270+ gui. state = "Idle" . to_string ( ) ;
271+ gui. display_flush ( ) . unwrap ( ) ;
272+ server. close ( ) . await ?;
270273 }
271274 }
272275 Event :: Event ( Event :: NOTIFY ) => {
0 commit comments