diff --git a/applications/services/desktop/desktop.c b/applications/services/desktop/desktop.c index 9366d65083..abe7d69bc4 100644 --- a/applications/services/desktop/desktop.c +++ b/applications/services/desktop/desktop.c @@ -214,8 +214,10 @@ static void desktop_stop_auto_lock_timer(Desktop* desktop) { static void desktop_auto_lock_arm(Desktop* desktop) { if(desktop->settings.auto_lock_delay_ms) { - desktop->input_events_subscription = furi_pubsub_subscribe( - desktop->input_events_pubsub, desktop_input_event_callback, desktop); + if(!desktop->input_events_subscription) { + desktop->input_events_subscription = furi_pubsub_subscribe( + desktop->input_events_pubsub, desktop_input_event_callback, desktop); + } desktop_start_auto_lock_timer(desktop); } } @@ -246,8 +248,10 @@ static void desktop_stop_auto_poweroff_timer(Desktop* desktop) { static void desktop_auto_poweroff_arm(Desktop* desktop) { if(desktop->settings.auto_poweroff_delay_ms) { - desktop->input_events_subscription = furi_pubsub_subscribe( - desktop->input_events_pubsub, desktop_input_event_callback, desktop); + if(desktop->input_events_subscription) { + desktop->input_events_subscription = furi_pubsub_subscribe( + desktop->input_events_pubsub, desktop_input_event_callback, desktop); + } desktop_start_auto_poweroff_timer(desktop); } }