mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Remove unnecessary event dispatch in FlushMountedPresenceSensorBlocFactory creation
This commit is contained in:
@ -16,6 +16,6 @@ abstract final class FlushMountedPresenceSensorBlocFactory {
|
|||||||
batchControlDevicesService: DebouncedBatchControlDevicesService(
|
batchControlDevicesService: DebouncedBatchControlDevicesService(
|
||||||
decoratee: RemoteBatchControlDevicesService(),
|
decoratee: RemoteBatchControlDevicesService(),
|
||||||
),
|
),
|
||||||
)..add(FlushMountedPresenceSensorFetchStatusEvent());
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
Reference in New Issue
Block a user