diff --git a/lib/chat_room/cubit/chat_room_cubit.dart b/lib/chat_room/cubit/chat_room_cubit.dart index 49c8edb7a..6aa29525c 100644 --- a/lib/chat_room/cubit/chat_room_cubit.dart +++ b/lib/chat_room/cubit/chat_room_cubit.dart @@ -312,8 +312,7 @@ abstract class ChatRoomCubit extends Cubit { final List invites = []; - if (profileCubit.state.model.walletType == WalletType.enterprise && - helpCenterOptions.customChatSupport && + if (helpCenterOptions.customChatSupport && helpCenterOptions.customChatSupportName != null) { invites.add(helpCenterOptions.customChatSupportName!); } diff --git a/lib/onboarding/helper_function/helper_function.dart b/lib/onboarding/helper_function/helper_function.dart index d68b07439..96806f951 100644 --- a/lib/onboarding/helper_function/helper_function.dart +++ b/lib/onboarding/helper_function/helper_function.dart @@ -44,20 +44,18 @@ Future generateAccount({ isFromOnboarding: true, ); - if (profileCubit.state.model.walletType == WalletType.enterprise) { - final helpCenterOptions = - profileCubit.state.model.profileSetting.helpCenterOptions; + final helpCenterOptions = + profileCubit.state.model.profileSetting.helpCenterOptions; - if (helpCenterOptions.customChatSupport && - helpCenterOptions.customChatSupportName != null) { - await altmeChatSupportCubit.init(); - } + if (helpCenterOptions.customChatSupport && + helpCenterOptions.customChatSupportName != null) { + await altmeChatSupportCubit.init(); + } - if (helpCenterOptions.customNotification != null && - helpCenterOptions.customNotification! && - helpCenterOptions.customNotificationRoom != null) { - await matrixNotificationCubit.init(); - } + if (helpCenterOptions.customNotification != null && + helpCenterOptions.customNotification! && + helpCenterOptions.customNotificationRoom != null) { + await matrixNotificationCubit.init(); } await homeCubit.emitHasWallet(); diff --git a/lib/splash/cubit/splash_cubit.dart b/lib/splash/cubit/splash_cubit.dart index b4e5aca26..72534c841 100644 --- a/lib/splash/cubit/splash_cubit.dart +++ b/lib/splash/cubit/splash_cubit.dart @@ -57,20 +57,19 @@ class SplashCubit extends Cubit { if (hasWallet) { await homeCubit.emitHasWallet(); - if (profileCubit.state.model.walletType == WalletType.enterprise) { - final helpCenterOptions = - profileCubit.state.model.profileSetting.helpCenterOptions; - - if (helpCenterOptions.customChatSupport && - helpCenterOptions.customChatSupportName != null) { - await altmeChatSupportCubit.init(); - } - - if (helpCenterOptions.customNotification != null && - helpCenterOptions.customNotification! && - helpCenterOptions.customNotificationRoom != null) { - await matrixNotificationCubit.init(); - } + + final helpCenterOptions = + profileCubit.state.model.profileSetting.helpCenterOptions; + + if (helpCenterOptions.customChatSupport && + helpCenterOptions.customChatSupportName != null) { + await altmeChatSupportCubit.init(); + } + + if (helpCenterOptions.customNotification != null && + helpCenterOptions.customNotification! && + helpCenterOptions.customNotificationRoom != null) { + await matrixNotificationCubit.init(); } emit(state.copyWith(status: SplashStatus.routeToPassCode));