mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 08:49:39 +00:00
push fixes
This commit is contained in:
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/smart_scene/smart_scene_select_dart_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
|
||||
@ -31,7 +30,6 @@ mixin SceneLogicHelper {
|
||||
required List<SceneStaticFunction> conditions,
|
||||
}) {
|
||||
final sceneBloc = context.read<CreateSceneBloc>();
|
||||
final smartSceneBloc = context.read<SmartSceneSelectBloc>();
|
||||
|
||||
if (isOnlyDelayOrDelayLast(actions)) {
|
||||
context.showCustomSnackbar(
|
||||
@ -85,9 +83,8 @@ mixin SceneLogicHelper {
|
||||
}
|
||||
if (task.code == CreateSceneEnum.smartSceneSelect.name) {
|
||||
return CreateSceneAction(
|
||||
entityId: smartSceneBloc.smartSceneEnable?.entityId ?? '',
|
||||
actionExecutor:
|
||||
smartSceneBloc.smartSceneEnable?.actionExecutor ?? '',
|
||||
entityId: actions[index].deviceId,
|
||||
actionExecutor: actions[index].functionValue,
|
||||
executorProperty: null);
|
||||
}
|
||||
return CreateSceneAction(
|
||||
@ -132,9 +129,8 @@ mixin SceneLogicHelper {
|
||||
}
|
||||
if (task.code == CreateSceneEnum.smartSceneSelect.name) {
|
||||
return CreateSceneAction(
|
||||
entityId: smartSceneBloc.smartSceneEnable?.entityId ?? '',
|
||||
actionExecutor:
|
||||
smartSceneBloc.smartSceneEnable?.actionExecutor ?? '',
|
||||
entityId: actions[index].deviceId,
|
||||
actionExecutor: actions[index].functionValue,
|
||||
executorProperty: null);
|
||||
}
|
||||
return CreateSceneAction(
|
||||
@ -190,4 +186,16 @@ mixin SceneLogicHelper {
|
||||
isAutomation: isAutomation,
|
||||
);
|
||||
}
|
||||
|
||||
String getTaskDescription(SceneStaticFunction taskItem) {
|
||||
if (taskItem.code == CreateSceneEnum.smartSceneSelect.name) {
|
||||
if (taskItem.operationName == 'automation') {
|
||||
return 'Automation: ';
|
||||
} else {
|
||||
return 'Tab-To-Run: ';
|
||||
}
|
||||
} else {
|
||||
return "${taskItem.operationName}: ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user