Hotfix: Temporarily hide Add condition in filter rule for release new version
(cherry picked from commit 0f2fed32245e1140d0b957dcc4b850d8970bd04b)
This commit is contained in:
+16
-10
@@ -184,11 +184,11 @@ class RulesFilterCreatorController extends BaseMailboxController {
|
||||
);
|
||||
listRuleCondition.add(currentRule);
|
||||
RulesFilterInputFieldArguments newRuleConditionValueArguments = RulesFilterInputFieldArguments(
|
||||
focusNode: FocusNode(),
|
||||
errorText: '',
|
||||
controller: TextEditingController(),
|
||||
);
|
||||
listRuleConditionValueArguments.add(newRuleConditionValueArguments);
|
||||
focusNode: FocusNode(),
|
||||
errorText: '',
|
||||
controller: TextEditingController(),
|
||||
);
|
||||
listRuleConditionValueArguments.add(newRuleConditionValueArguments);
|
||||
emailRuleFilterActionSelected.value = EmailRuleFilterAction.moveMessage;
|
||||
_setValueInputField(
|
||||
listRuleConditionValueArguments[0].controller,
|
||||
@@ -311,10 +311,11 @@ class RulesFilterCreatorController extends BaseMailboxController {
|
||||
}
|
||||
}
|
||||
|
||||
void createNewRuleFilter(BuildContext context) async {
|
||||
void createNewRuleFilter(BuildContext context) {
|
||||
KeyboardUtils.hideKeyboard(context);
|
||||
|
||||
final errorName = _getErrorStringByInputValue(context, _newRuleName);
|
||||
log('RulesFilterCreatorController::createNewRuleFilter:errorName: $errorName');
|
||||
if (errorName?.isNotEmpty == true) {
|
||||
errorRuleName.value = errorName;
|
||||
inputRuleNameFocusNode.requestFocus();
|
||||
@@ -322,23 +323,28 @@ class RulesFilterCreatorController extends BaseMailboxController {
|
||||
}
|
||||
|
||||
if (listRuleCondition.isNotEmpty) {
|
||||
String? errorConditionString;
|
||||
for (var ruleCondition in listRuleCondition) {
|
||||
String? errorString = _getErrorStringByInputValue(context, ruleCondition.value);
|
||||
if (errorString != null) {
|
||||
errorConditionString = _getErrorStringByInputValue(context, ruleCondition.value);
|
||||
log('RulesFilterCreatorController::createNewRuleFilter:errorConditionString: $errorConditionString');
|
||||
if (errorConditionString != null) {
|
||||
int ruleConditionIndex = listRuleCondition.indexOf(ruleCondition);
|
||||
RulesFilterInputFieldArguments newRuleConditionValueArguments = RulesFilterInputFieldArguments(
|
||||
focusNode: listRuleConditionValueArguments[ruleConditionIndex].focusNode,
|
||||
errorText: errorString,
|
||||
errorText: errorConditionString,
|
||||
controller: listRuleConditionValueArguments[ruleConditionIndex].controller,
|
||||
);
|
||||
listRuleConditionValueArguments[ruleConditionIndex] = newRuleConditionValueArguments;
|
||||
listRuleConditionValueArguments[listRuleCondition.indexOf(ruleCondition)].focusNode.requestFocus();
|
||||
}
|
||||
}
|
||||
return;
|
||||
if (errorConditionString?.isNotEmpty == true) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final errorAction = _getErrorStringByInputValue(context, mailboxSelected.value?.getDisplayName(context));
|
||||
log('RulesFilterCreatorController::createNewRuleFilter:errorAction: $errorAction');
|
||||
if (errorAction?.isNotEmpty == true) {
|
||||
errorRuleActionValue.value = errorAction;
|
||||
if (currentOverlayContext != null && currentContext != null) {
|
||||
|
||||
@@ -147,31 +147,31 @@ class RuleFilterCreatorView extends GetWidget<RulesFilterCreatorController> {
|
||||
color: Colors.black)),
|
||||
const SizedBox(height: 24),
|
||||
_buildListRuleFilterConditionList(context, RuleFilterConditionScreenType.desktop),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: InkWell(
|
||||
onTap: controller.tapAddCondition,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
_imagePaths.icAddNewFolder,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
const SizedBox(width: 15,),
|
||||
Text(
|
||||
AppLocalizations.of(context).addCondition,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 17,
|
||||
color: AppColor.primaryColor
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(top: 8),
|
||||
// child: InkWell(
|
||||
// onTap: controller.tapAddCondition,
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// _imagePaths.icAddNewFolder,
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
// const SizedBox(width: 15,),
|
||||
// Text(
|
||||
// AppLocalizations.of(context).addCondition,
|
||||
// maxLines: 1,
|
||||
// style: const TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 17,
|
||||
// color: AppColor.primaryColor
|
||||
// )
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
const SizedBox(height: 24),
|
||||
Text(AppLocalizations.of(context).actionTitleRulesFilter,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
@@ -298,31 +298,31 @@ class RuleFilterCreatorView extends GetWidget<RulesFilterCreatorController> {
|
||||
color: Colors.black)),
|
||||
const SizedBox(height: 24),
|
||||
_buildListRuleFilterConditionList(context, RuleFilterConditionScreenType.tablet),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: InkWell(
|
||||
onTap: controller.tapAddCondition,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
_imagePaths.icAddNewFolder,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
const SizedBox(width: 15,),
|
||||
Text(
|
||||
AppLocalizations.of(context).addCondition,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 17,
|
||||
color: AppColor.primaryColor
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(top: 8),
|
||||
// child: InkWell(
|
||||
// onTap: controller.tapAddCondition,
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// _imagePaths.icAddNewFolder,
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
// const SizedBox(width: 15,),
|
||||
// Text(
|
||||
// AppLocalizations.of(context).addCondition,
|
||||
// maxLines: 1,
|
||||
// style: const TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 17,
|
||||
// color: AppColor.primaryColor
|
||||
// )
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
const SizedBox(height: 24),
|
||||
Text(AppLocalizations.of(context).actionTitleRulesFilter,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
@@ -455,32 +455,32 @@ class RuleFilterCreatorView extends GetWidget<RulesFilterCreatorController> {
|
||||
color: Colors.black)),
|
||||
const SizedBox(height: 24),
|
||||
_buildListRuleFilterConditionList(context, RuleFilterConditionScreenType.mobile),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
child: InkWell(
|
||||
onTap: controller.tapAddCondition,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
_imagePaths.icAddNewFolder,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
const SizedBox(width: 15,),
|
||||
Text(
|
||||
AppLocalizations.of(context).addCondition,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 17,
|
||||
color: AppColor.primaryColor
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(top: 12),
|
||||
// child: InkWell(
|
||||
// onTap: controller.tapAddCondition,
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// _imagePaths.icAddNewFolder,
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
// const SizedBox(width: 15,),
|
||||
// Text(
|
||||
// AppLocalizations.of(context).addCondition,
|
||||
// maxLines: 1,
|
||||
// style: const TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 17,
|
||||
// color: AppColor.primaryColor
|
||||
// )
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 12),
|
||||
child: Divider(
|
||||
|
||||
+8
-9
@@ -6,7 +6,6 @@ import 'package:rule_filter/rule_filter/rule_condition.dart' as rule_condition;
|
||||
import 'package:tmail_ui_user/features/base/widget/drop_down_button_widget.dart';
|
||||
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/model/rule_filter_condition_type.dart';
|
||||
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/widgets/rule_filter_button_field.dart';
|
||||
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/widgets/rule_filter_condition_remove_button_builder.dart';
|
||||
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/widgets/rules_filter_input_field_builder.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
@@ -106,14 +105,14 @@ class RuleFilterConditionRow extends StatelessWidget {
|
||||
editingController: conditionValueEditingController,
|
||||
)
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(left: 12),
|
||||
alignment: Alignment.center,
|
||||
child: RuleFilterConditionRemoveButton(
|
||||
tapRemoveRuleFilterConditionCallback: tapRemoveRuleFilterConditionCallback,
|
||||
imagePath: imagePaths,
|
||||
)
|
||||
),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(left: 12),
|
||||
// alignment: Alignment.center,
|
||||
// child: RuleFilterConditionRemoveButton(
|
||||
// tapRemoveRuleFilterConditionCallback: tapRemoveRuleFilterConditionCallback,
|
||||
// imagePath: imagePaths,
|
||||
// )
|
||||
// ),
|
||||
],
|
||||
);
|
||||
default:
|
||||
|
||||
+3
-2
@@ -37,9 +37,10 @@ class RuleFilterConditionWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Slidable(
|
||||
enabled: ruleFilterConditionScreenType == RuleFilterConditionScreenType.mobile ? true : false,
|
||||
// enabled: ruleFilterConditionScreenType == RuleFilterConditionScreenType.mobile ? true : false,
|
||||
enabled: false,
|
||||
endActionPane: ActionPane(
|
||||
extentRatio: 0.1,
|
||||
extentRatio: 0.1,
|
||||
motion: const BehindMotion(),
|
||||
children: [
|
||||
CustomSlidableAction(
|
||||
|
||||
Reference in New Issue
Block a user