TF-1625 Remove Rxn<Session> variable and only use Rxn<AccountId> variable to listen change

(cherry picked from commit 9b56575290cbbf3ed47835117529e0d75346d703)
This commit is contained in:
dab246
2023-03-21 17:29:44 +07:00
committed by Dat Vu
parent bb9dbb697a
commit 963613a3b6
10 changed files with 52 additions and 57 deletions
@@ -50,7 +50,7 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
endIndent: SettingsUtils.getHorizontalPadding(context, _responsiveUtils)
),
Obx(() {
if (controller.manageAccountDashboardController.checkAvailableRuleFilterInSession()) {
if (controller.manageAccountDashboardController.isRuleFilterCapabilitySupported) {
return Column(children: [
SettingFirstLevelTileBuilder(
AccountMenuItem.emailRules.getName(context),
@@ -70,7 +70,7 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
}
}),
Obx(() {
if (controller.manageAccountDashboardController.checkAvailableForwardInSession()) {
if (controller.manageAccountDashboardController.isForwardCapabilitySupported) {
return Column(children: [
SettingFirstLevelTileBuilder(
AccountMenuItem.forward.getName(context),
@@ -90,7 +90,7 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
}
}),
Obx(() {
if (controller.manageAccountDashboardController.checkAvailableVacationInSession()) {
if (controller.manageAccountDashboardController.isVacationCapabilitySupported) {
return Column(children: [
SettingFirstLevelTileBuilder(
AccountMenuItem.vacation.getName(context),
@@ -138,7 +138,7 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
AppLocalizations.of(context).sign_out,
_imagePaths.icSignOut,
() => controller.manageAccountDashboardController.logout(
controller.manageAccountDashboardController.sessionCurrent.value,
controller.manageAccountDashboardController.sessionCurrent,
controller.manageAccountDashboardController.accountId.value)
),
]),
@@ -194,19 +194,19 @@ class SettingsView extends GetWidget<SettingsController> {
case AccountMenuItem.languageAndRegion:
return LanguageAndRegionView();
case AccountMenuItem.emailRules:
if (controller.manageAccountDashboardController.checkAvailableRuleFilterInSession()) {
if (controller.manageAccountDashboardController.isRuleFilterCapabilitySupported) {
return EmailRulesView();
} else {
return const SizedBox.shrink();
}
case AccountMenuItem.forward:
if (controller.manageAccountDashboardController.checkAvailableForwardInSession()) {
if (controller.manageAccountDashboardController.isForwardCapabilitySupported) {
return ForwardView();
} else {
return const SizedBox.shrink();
}
case AccountMenuItem.vacation:
if (controller.manageAccountDashboardController.checkAvailableVacationInSession()) {
if (controller.manageAccountDashboardController.isVacationCapabilitySupported) {
return VacationView();
} else {
return const SizedBox.shrink();