From c23113536041efa9c604a03103c52b8fb8dce74e Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Fri, 6 Sep 2024 17:07:27 +0545 Subject: [PATCH] feat: Move notification menu to differnt place #2869 --- .../help_center/view/help_center_menu.dart | 9 --------- .../view/wallet_settings_menu.dart | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/dashboard/drawer/help_center/help_center/view/help_center_menu.dart b/lib/dashboard/drawer/help_center/help_center/view/help_center_menu.dart index bce92f810..4ddf2d220 100644 --- a/lib/dashboard/drawer/help_center/help_center/view/help_center_menu.dart +++ b/lib/dashboard/drawer/help_center/help_center/view/help_center_menu.dart @@ -1,7 +1,6 @@ import 'package:altme/app/app.dart'; import 'package:altme/dashboard/dashboard.dart'; import 'package:altme/l10n/l10n.dart'; -import 'package:altme/matrix_notification/matrix_notification.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -86,14 +85,6 @@ class HelpCenterView extends StatelessWidget { }, ), ], - if (helpCenterOptions.displayNotification && isEnterprise) ...[ - DrawerItem( - title: l10n.notificationRoom, - onTap: () { - Navigator.of(context).push(NotificationPage.route()); - }, - ), - ], if (helpCenterOptions.displayEmailSupport) ...[ DrawerItem( title: l10n.sendAnEmail, diff --git a/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart b/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart index 4c07cd35c..a207e2e2d 100644 --- a/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart +++ b/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart @@ -3,7 +3,9 @@ import 'package:altme/dashboard/dashboard.dart'; import 'package:altme/dashboard/drawer/wallet_settings/view/language_settings.dart'; import 'package:altme/dashboard/drawer/wallet_settings/view/theme_settings.dart'; import 'package:altme/l10n/l10n.dart'; +import 'package:altme/matrix_notification/matrix_notification.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; class WalletSettingsMenu extends StatelessWidget { const WalletSettingsMenu({super.key}); @@ -28,6 +30,12 @@ class WalletSettingsMenuView extends StatelessWidget { Widget build(BuildContext context) { final l10n = context.l10n; + final profileModel = context.read().state.model; + + final helpCenterOptions = profileModel.profileSetting.helpCenterOptions; + + final isEnterprise = profileModel.walletType == WalletType.enterprise; + return BasePage( backgroundColor: Theme.of(context).colorScheme.surface, useSafeArea: true, @@ -55,6 +63,14 @@ class WalletSettingsMenuView extends StatelessWidget { await Navigator.of(context).push(ThemeSettings.route()); }, ), + if (helpCenterOptions.displayNotification && isEnterprise) ...[ + DrawerItem( + title: l10n.notificationRoom, + onTap: () { + Navigator.of(context).push(NotificationPage.route()); + }, + ), + ], ], ), );