hide notification settings if FCM is not supported

This commit is contained in:
Florent Azavant
2025-01-24 13:37:17 +01:00
committed by Dat H. Pham
parent ce8f59dcf3
commit 7a27415295
2 changed files with 29 additions and 14 deletions
@@ -141,20 +141,26 @@ class SettingsFirstLevelView extends GetWidget<SettingsController> {
AccountMenuItem.languageAndRegion.getIcon(controller.imagePaths),
() => controller.selectSettings(AccountMenuItem.languageAndRegion)
),
if (PlatformInfo.isMobile) ...[
Divider(
color: AppColor.colorDividerHorizontal,
height: 1,
indent: SettingsUtils.getHorizontalPadding(context, controller.responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, controller.responsiveUtils)
),
SettingFirstLevelTileBuilder(
AppLocalizations.of(context).notification,
controller.imagePaths.icNotification,
() => controller.selectSettings(AccountMenuItem.notification),
subtitle: AppLocalizations.of(context).allowsTwakeMailToNotifyYouWhenANewMessageArrivesOnYourPhone,
)
],
Obx(() {
if (PlatformInfo.isMobile && controller.manageAccountDashboardController.isFcmCapabilitySupported) {
return Column(children: [
Divider(
color: AppColor.colorDividerHorizontal,
height: 1,
indent: SettingsUtils.getHorizontalPadding(context, controller.responsiveUtils),
endIndent: SettingsUtils.getHorizontalPadding(context, controller.responsiveUtils)
),
SettingFirstLevelTileBuilder(
AppLocalizations.of(context).notification,
controller.imagePaths.icNotification,
() => controller.selectSettings(AccountMenuItem.notification),
subtitle: AppLocalizations.of(context).allowsTwakeMailToNotifyYouWhenANewMessageArrivesOnYourPhone,
)
]);
} else {
return const SizedBox.shrink();
}
}),
Obx(() {
final accountId = controller
.manageAccountDashboardController