Skip to content

Commit

Permalink
Update notification room #2875
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Sep 6, 2024
1 parent 9fa740e commit 3e1bd82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/chat_room/cubit/chat_room_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ abstract class ChatRoomCubit extends Cubit<ChatRoomState> {
}

Future<void> clearRoomIdFromStorage() async {
_roomId = null;
await matrixChat.clearRoomIdInStorage(roomIdStoredKey);
}

Expand Down Expand Up @@ -287,6 +288,7 @@ abstract class ChatRoomCubit extends Cubit<ChatRoomState> {
SecureStorageKeys.notificationRoomName,
roomName,
);

_roomId = await matrixChat.joinRoom(roomName);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
Future<void> resetWallet(BuildContext context) async {
await context.read<AltmeChatSupportCubit>().dispose();
await context.read<MatrixNotificationCubit>().dispose();
await context.read<ProfileCubit>().resetProfile();
await context
.read<WalletCubit>()
.resetWallet(context.read<CredentialsCubit>()); // should be at last
.resetWallet(context.read<CredentialsCubit>());
await context.read<ProfileCubit>().resetProfile();
}
1 change: 0 additions & 1 deletion lib/enterprise/cubit/enterprise_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ class EnterpriseCubit extends Cubit<EnterpriseState> {

if (roomName != savedRoomName) {
await matrixNotificationCubit.clearRoomIdFromStorage();
await matrixNotificationCubit.dispose();
}

await matrixNotificationCubit.init();
Expand Down

0 comments on commit 3e1bd82

Please sign in to comment.