File tree 1 file changed +8
-4
lines changed
applications/services/desktop
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -214,8 +214,10 @@ static void desktop_stop_auto_lock_timer(Desktop* desktop) {
214
214
215
215
static void desktop_auto_lock_arm (Desktop * desktop ) {
216
216
if (desktop -> settings .auto_lock_delay_ms ) {
217
- desktop -> input_events_subscription = furi_pubsub_subscribe (
218
- desktop -> input_events_pubsub , desktop_input_event_callback , desktop );
217
+ if (!desktop -> input_events_subscription ) {
218
+ desktop -> input_events_subscription = furi_pubsub_subscribe (
219
+ desktop -> input_events_pubsub , desktop_input_event_callback , desktop );
220
+ }
219
221
desktop_start_auto_lock_timer (desktop );
220
222
}
221
223
}
@@ -246,8 +248,10 @@ static void desktop_stop_auto_poweroff_timer(Desktop* desktop) {
246
248
247
249
static void desktop_auto_poweroff_arm (Desktop * desktop ) {
248
250
if (desktop -> settings .auto_poweroff_delay_ms ) {
249
- desktop -> input_events_subscription = furi_pubsub_subscribe (
250
- desktop -> input_events_pubsub , desktop_input_event_callback , desktop );
251
+ if (desktop -> input_events_subscription ) {
252
+ desktop -> input_events_subscription = furi_pubsub_subscribe (
253
+ desktop -> input_events_pubsub , desktop_input_event_callback , desktop );
254
+ }
251
255
desktop_start_auto_poweroff_timer (desktop );
252
256
}
253
257
}
You can’t perform that action at this time.
0 commit comments