From 42d6b64e588a96210a131dd050ea6cc63739234c Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Wed, 23 Apr 2025 10:32:49 +0300 Subject: [PATCH] Refactor FlushMountedPresenceSensorBloc to replace _runDeBouncer with _controlDevice for handling device control logic --- .../bloc/flush_mounted_presence_sensor_bloc.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/device_managment/flush_mounted_presence_sensor/bloc/flush_mounted_presence_sensor_bloc.dart b/lib/pages/device_managment/flush_mounted_presence_sensor/bloc/flush_mounted_presence_sensor_bloc.dart index 98cfa977..f15c14d6 100644 --- a/lib/pages/device_managment/flush_mounted_presence_sensor/bloc/flush_mounted_presence_sensor_bloc.dart +++ b/lib/pages/device_managment/flush_mounted_presence_sensor/bloc/flush_mounted_presence_sensor_bloc.dart @@ -138,7 +138,7 @@ class FlushMountedPresenceSensorBloc break; } emit(FlushMountedPresenceSensorUpdateState(model: deviceStatus)); - await _runDeBouncer( + await _controlDevice( deviceId: deviceId, code: event.code, value: event.value, @@ -178,7 +178,7 @@ class FlushMountedPresenceSensorBloc break; } emit(FlushMountedPresenceSensorUpdateState(model: deviceStatus)); - await _runDeBouncer( + await _controlDevice( deviceId: event.deviceIds, code: event.code, value: event.value, @@ -187,7 +187,7 @@ class FlushMountedPresenceSensorBloc ); } - Future _runDeBouncer({ + Future _controlDevice({ required dynamic deviceId, required String code, required dynamic value,