|
|
|
@ -94,6 +94,9 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
AppState().setchatUserDetails = userLoginResponse;
|
|
|
|
AppState().setchatUserDetails = userLoginResponse;
|
|
|
|
Utils.saveStringFromPrefs("userLoginChatDetails", jsonEncode(userLoginResponse.response));
|
|
|
|
Utils.saveStringFromPrefs("userLoginChatDetails", jsonEncode(userLoginResponse.response));
|
|
|
|
isUserOnline = true;
|
|
|
|
isUserOnline = true;
|
|
|
|
|
|
|
|
if(Platform.isIOS){
|
|
|
|
|
|
|
|
AppState().setisUserOnline = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
AppState().setchatUserDetails = userLoginResponse;
|
|
|
|
AppState().setchatUserDetails = userLoginResponse;
|
|
|
|
Utils.saveStringFromPrefs("userLoginChatDetails", "null");
|
|
|
|
Utils.saveStringFromPrefs("userLoginChatDetails", "null");
|
|
|
|
@ -102,11 +105,17 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
disableChatForThisUser = true;
|
|
|
|
disableChatForThisUser = true;
|
|
|
|
isUserOnline = false;
|
|
|
|
isUserOnline = false;
|
|
|
|
|
|
|
|
if(Platform.isIOS){
|
|
|
|
|
|
|
|
AppState().setisUserOnline = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
disableChatForThisUser = true;
|
|
|
|
disableChatForThisUser = true;
|
|
|
|
isUserOnline = false;
|
|
|
|
isUserOnline = false;
|
|
|
|
|
|
|
|
if(Platform.isIOS){
|
|
|
|
|
|
|
|
AppState().setisUserOnline = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|