mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
bug fixes
This commit is contained in:
@ -363,11 +363,20 @@ class RoutineBloc extends Bloc<RoutineEvent, RoutineState> {
|
||||
|
||||
ifItems.removeAt(event.index);
|
||||
selectedFunctions.remove(event.key);
|
||||
emit(state.copyWith(ifItems: ifItems, selectedFunctions: selectedFunctions));
|
||||
if (ifItems.isEmpty && state.thenItems.isEmpty) {
|
||||
emit(state.copyWith(
|
||||
ifItems: ifItems,
|
||||
selectedFunctions: selectedFunctions,
|
||||
isAutomation: false,
|
||||
isTabToRun: false));
|
||||
} else {
|
||||
emit(state.copyWith(ifItems: ifItems, selectedFunctions: selectedFunctions));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FutureOr<void> _changeOperatorOperator(ChangeAutomationOperator event, Emitter<RoutineState> emit) {
|
||||
FutureOr<void> _changeOperatorOperator(
|
||||
ChangeAutomationOperator event, Emitter<RoutineState> emit) {
|
||||
emit(state.copyWith(
|
||||
selectedAutomationOperator: event.operator,
|
||||
));
|
||||
@ -396,7 +405,7 @@ class RoutineBloc extends Bloc<RoutineEvent, RoutineState> {
|
||||
selectedIcon: null,
|
||||
isTabToRun: false,
|
||||
isAutomation: false,
|
||||
selectedAutomationOperator: 'AND',
|
||||
selectedAutomationOperator: 'or',
|
||||
effectiveTime: null,
|
||||
routineName: null,
|
||||
);
|
||||
|
Reference in New Issue
Block a user