diff --git a/lib/chat_room/cubit/chat_room_cubit.dart b/lib/chat_room/cubit/chat_room_cubit.dart index 5ea9202e0..49c8edb7a 100644 --- a/lib/chat_room/cubit/chat_room_cubit.dart +++ b/lib/chat_room/cubit/chat_room_cubit.dart @@ -140,6 +140,7 @@ abstract class ChatRoomCubit extends Cubit { } Future clearRoomIdFromStorage() async { + _roomId = null; await matrixChat.clearRoomIdInStorage(roomIdStoredKey); } @@ -287,6 +288,7 @@ abstract class ChatRoomCubit extends Cubit { SecureStorageKeys.notificationRoomName, roomName, ); + _roomId = await matrixChat.joinRoom(roomName); } } else { diff --git a/lib/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart b/lib/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart index f5ed40483..f212cccd4 100644 --- a/lib/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart +++ b/lib/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart @@ -9,8 +9,8 @@ import 'package:flutter_bloc/flutter_bloc.dart'; Future resetWallet(BuildContext context) async { await context.read().dispose(); await context.read().dispose(); - await context.read().resetProfile(); await context .read() - .resetWallet(context.read()); // should be at last + .resetWallet(context.read()); + await context.read().resetProfile(); } diff --git a/lib/enterprise/cubit/enterprise_cubit.dart b/lib/enterprise/cubit/enterprise_cubit.dart index 71583ec46..0f2c887be 100644 --- a/lib/enterprise/cubit/enterprise_cubit.dart +++ b/lib/enterprise/cubit/enterprise_cubit.dart @@ -526,7 +526,6 @@ class EnterpriseCubit extends Cubit { if (roomName != savedRoomName) { await matrixNotificationCubit.clearRoomIdFromStorage(); - await matrixNotificationCubit.dispose(); } await matrixNotificationCubit.init();