From b5484972ade367ab712bf820d66fdf7764b9751b Mon Sep 17 00:00:00 2001 From: Parag Gupta <103507835+Dante291@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:25:35 +0530 Subject: [PATCH] makes chat inaccessible to the user (#2090) * makes chat inaccessible for the user * Adding TODO * closing hive boxes --- lib/view_model/main_screen_view_model.dart | 25 +++++++++++-------- .../app_settings/app_setting_page_test.dart | 3 +++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/view_model/main_screen_view_model.dart b/lib/view_model/main_screen_view_model.dart index 6d2c2ecc7..46b09ac3e 100644 --- a/lib/view_model/main_screen_view_model.dart +++ b/lib/view_model/main_screen_view_model.dart @@ -8,7 +8,7 @@ import 'package:talawa/services/size_config.dart'; import 'package:talawa/utils/app_localization.dart'; import 'package:talawa/view_model/base_view_model.dart'; import 'package:talawa/views/after_auth_screens/add_post_page.dart'; -import 'package:talawa/views/after_auth_screens/chat/chat_list_screen.dart'; +// import 'package:talawa/views/after_auth_screens/chat/chat_list_screen.dart'; import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; @@ -239,13 +239,16 @@ class MainScreenViewModel extends BaseModel { ), label: AppLocalizations.of(context)!.strictTranslate('Add'), ), - BottomNavigationBarItem( - icon: Icon( - Icons.chat_outlined, - key: keyBNChat, - ), - label: AppLocalizations.of(context)!.strictTranslate('Chat'), - ), + + /// Makes chat inaccessible for the user + //TODO: add chat functionality + // BottomNavigationBarItem( + // icon: Icon( + // Icons.chat_outlined, + // key: keyBNChat, + // ), + // label: AppLocalizations.of(context)!.strictTranslate('Chat'), + // ), BottomNavigationBarItem( icon: Icon( Icons.account_circle, @@ -268,9 +271,9 @@ class MainScreenViewModel extends BaseModel { key: const Key('AddPost'), drawerKey: MainScreenViewModel.scaffoldKey, ), - const ChatPage( - key: Key('Chats'), - ), + // const ChatPage( + // key: Key('Chats'), + // ), ProfilePage( key: keySPEditProfile, homeModel: this, diff --git a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart index 016cecb44..935f34dcc 100644 --- a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart +++ b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart @@ -101,6 +101,9 @@ Future main() async { await Hive.openBox('currentUser'); await Hive.openBox('currentOrg'); await Hive.openBox('url'); + tearDown(() async { + await Hive.close(); + }); group('Setting Page Screen Widget Test in dark mode', () { testWidgets("Testing if Settings Screen shows up", (tester) async {