merge-requests/188/head
Aamir Muhammad 3 years ago
parent 5a338199b9
commit 55cf39a364

@ -84,11 +84,10 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
bool disbaleChatForThisUser = false;
bool isCall = false;
userLoginToken.UserAutoLoginModel userLoginData = userLoginToken.UserAutoLoginModel();
Future<void> getUserAutoLoginToken() async {
try {
userLoginToken.UserAutoLoginModel userLoginResponse = await ChatApiClient().getUserLoginToken();
if (userLoginResponse.response != null) {
AppState().setchatUserDetails = userLoginResponse;
@ -100,6 +99,10 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
disbaleChatForThisUser = true;
notifyListeners();
}
} catch (e) {
disbaleChatForThisUser = true;
notifyListeners();
}
}
Future<void> buildHubConnection({required BuildContext context, required ChatCallProvider ccProvider}) async {

@ -127,6 +127,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
if (chatHubConnection.state == HubConnectionState.Connected) {
Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.chat);
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
}
}

Loading…
Cancel
Save