TF-788 In the case of SettingsView, accountIdWorker is not triggered, so refresh

This commit is contained in:
Dat PHAM HOANG
2022-08-24 12:18:00 +07:00
committed by Dat H. Pham
parent 606f94d60f
commit 38a1b6e642
2 changed files with 54 additions and 4 deletions
@@ -45,11 +45,49 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
indent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils)
),
Obx(() {
if (controller.manageAccountDashboardController.checkAvailableRuleFilterInSession()) {
return Column(children: [
SettingFirstLevelTileBuilder(
AccountMenuItem.emailRules.getName(context),
AccountMenuItem.emailRules.getIcon(_imagePaths),
subtitle: AppLocalizations.of(context).emailRuleSettingExplanation,
() => controller.selectSettings(AccountMenuItem.emailRules)
),
Divider(
color: AppColor.colorDividerComposer,
height: 1,
indent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils)
),
]);
} else {
return const SizedBox.shrink();
}
}),
Obx(() {
if (controller.manageAccountDashboardController.checkAvailableForwardInSession()) {
return Column(children: [
SettingFirstLevelTileBuilder(
AccountMenuItem.forward.getName(context),
AccountMenuItem.forward.getIcon(_imagePaths),
() => controller.selectSettings(AccountMenuItem.forward)
),
Divider(
color: AppColor.colorDividerComposer,
height: 1,
indent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils)
),
]);
} else {
return const SizedBox.shrink();
}
}),
SettingFirstLevelTileBuilder(
AccountMenuItem.emailRules.getName(context),
AccountMenuItem.emailRules.getIcon(_imagePaths),
subtitle: AppLocalizations.of(context).emailRuleSettingExplanation,
() => controller.selectSettings(AccountMenuItem.emailRules)
AccountMenuItem.vacation.getName(context),
AccountMenuItem.vacation.getIcon(_imagePaths),
() => controller.selectSettings(AccountMenuItem.vacation)
),
Divider(
color: AppColor.colorDividerComposer,
@@ -62,6 +100,12 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
AccountMenuItem.languageAndRegion.getIcon(_imagePaths),
() => controller.selectSettings(AccountMenuItem.languageAndRegion)
),
Divider(
color: AppColor.colorDividerComposer,
height: 1,
indent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils)
),
]);
}
}