Remove unnecessary event dispatch in FlushMountedPresenceSensorBlocFactory creation

This commit is contained in:
Faris Armoush
2025-04-24 14:29:18 +03:00
parent ba20998067
commit c8e540e938
3 changed files with 3 additions and 3 deletions

View File

@ -16,6 +16,6 @@ abstract final class FlushMountedPresenceSensorBlocFactory {
batchControlDevicesService: DebouncedBatchControlDevicesService( batchControlDevicesService: DebouncedBatchControlDevicesService(
decoratee: RemoteBatchControlDevicesService(), decoratee: RemoteBatchControlDevicesService(),
), ),
)..add(FlushMountedPresenceSensorFetchStatusEvent()); );
} }
} }

View File

@ -22,7 +22,7 @@ class FlushMountedPresenceSensorBatchControlView extends StatelessWidget
return BlocProvider( return BlocProvider(
create: (context) => FlushMountedPresenceSensorBlocFactory.create( create: (context) => FlushMountedPresenceSensorBlocFactory.create(
deviceId: devicesIds.first, deviceId: devicesIds.first,
), )..add(FlushMountedPresenceSensorFetchBatchStatusEvent(devicesIds)),
child: BlocBuilder<FlushMountedPresenceSensorBloc, child: BlocBuilder<FlushMountedPresenceSensorBloc,
FlushMountedPresenceSensorState>( FlushMountedPresenceSensorState>(
builder: (context, state) { builder: (context, state) {

View File

@ -24,7 +24,7 @@ class FlushMountedPresenceSensorControlView extends StatelessWidget
return BlocProvider( return BlocProvider(
create: (context) => FlushMountedPresenceSensorBlocFactory.create( create: (context) => FlushMountedPresenceSensorBlocFactory.create(
deviceId: device.uuid ?? '-1', deviceId: device.uuid ?? '-1',
), )..add(FlushMountedPresenceSensorFetchStatusEvent()),
child: BlocBuilder<FlushMountedPresenceSensorBloc, child: BlocBuilder<FlushMountedPresenceSensorBloc,
FlushMountedPresenceSensorState>( FlushMountedPresenceSensorState>(
builder: (context, state) { builder: (context, state) {