@@ -187,7 +187,7 @@ impl CommandSticker {
187187 && this. process . is_none ( )
188188 && !this. is_schedule_active ( )
189189 {
190- this. start ( window, cx) ;
190+ this. start ( window, cx, true ) ;
191191 }
192192 } ) ;
193193 } )
@@ -285,7 +285,7 @@ impl CommandSticker {
285285 self . schedule_cancel . is_some ( )
286286 }
287287
288- fn start ( & mut self , window : & Window , cx : & mut Context < Self > ) {
288+ fn start ( & mut self , window : & Window , cx : & mut Context < Self > , is_restore : bool ) {
289289 self . started_at = Some ( crate :: utils:: time:: now_unix_millis ( ) ) ;
290290
291291 let _ = self . save_config ( cx) ;
@@ -315,7 +315,7 @@ impl CommandSticker {
315315 }
316316 } ;
317317
318- if self . run_immediately {
318+ if self . run_immediately && !is_restore {
319319 self . run ( window, cx) ;
320320 }
321321
@@ -928,7 +928,7 @@ impl Render for CommandSticker {
928928 . bg ( transparent_white ( ) )
929929 . border_0 ( )
930930 . on_click ( cx. listener ( |this, _, window, cx| {
931- this. start ( window, cx) ;
931+ this. start ( window, cx, false ) ;
932932 } ) ) ,
933933 ) ,
934934 ) ;
@@ -992,7 +992,7 @@ impl Render for CommandSticker {
992992 . bg ( transparent_white ( ) )
993993 . border_0 ( )
994994 . on_click ( cx. listener ( |this, _, window, cx| {
995- this. start ( window, cx) ;
995+ this. start ( window, cx, false ) ;
996996 } ) ) ,
997997 ) ,
998998 ) ;
0 commit comments