mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
fixes
This commit is contained in:
@ -381,14 +381,13 @@ class WaterHeaterBloc extends Bloc<WaterHeaterEvent, WaterHeaterState> {
|
||||
groupTwoGangList.map((device) => device.deviceId).toList();
|
||||
final response = await DevicesAPI.deviceController(
|
||||
code: 'switch_1',
|
||||
devicesUuid: allDeviceIds,
|
||||
devicesUuid: [event.deviceId],
|
||||
value: !event.value,
|
||||
);
|
||||
|
||||
emit(UpdateGroupState(
|
||||
twoGangList: groupTwoGangList, allSwitches: allSwitchesValue));
|
||||
if (!response['success']) {
|
||||
// add(InitialEvent(groupScreen: twoGangGroup));
|
||||
add(InitialWizardEvent());
|
||||
}
|
||||
} catch (_) {
|
||||
// add(InitialEvent(groupScreen: twoGangGroup));
|
||||
@ -470,12 +469,12 @@ class WaterHeaterBloc extends Bloc<WaterHeaterEvent, WaterHeaterState> {
|
||||
// Check if either response is unsuccessful, then reset to initial state
|
||||
if (!response1['success'] || !response2['success']) {
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
// add(const InitialEvent(groupScreen: true));
|
||||
add(InitialWizardEvent());
|
||||
}
|
||||
} catch (_) {
|
||||
// In case of an error, delay and reset the screen to initial state
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
// add(const InitialEvent(groupScreen: true));
|
||||
add(InitialWizardEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,12 +511,12 @@ class WaterHeaterBloc extends Bloc<WaterHeaterEvent, WaterHeaterState> {
|
||||
// Check if either response is unsuccessful, then reset to initial state
|
||||
if (!response1['success'] || !response2['success']) {
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
// add(const InitialEvent(groupScreen: true));
|
||||
add(InitialWizardEvent());
|
||||
}
|
||||
} catch (_) {
|
||||
// In case of an error, delay and reset the screen to initial state
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
// add(const InitialEvent(groupScreen: true));
|
||||
add(InitialWizardEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user