use of chat.rocket.android.helper.LogIfError in project Rocket.Chat.Android by RocketChat.
the class OAuthPresenter method login.
@Override
public void login(JSONObject credentialJsonObject) {
if (credentialJsonObject == null || !credentialJsonObject.optBoolean("setCredentialToken")) {
view.showLoginError();
return;
}
final String credentialToken = credentialJsonObject.optString("credentialToken");
final String credentialSecret = credentialJsonObject.optString("credentialSecret");
if (TextUtils.isEmpty(credentialToken) || TextUtils.isEmpty(credentialSecret)) {
view.showLoginError();
return;
}
view.showLoginDone();
methodCallHelper.loginWithOAuth(credentialToken, credentialSecret).continueWith(new LogIfError());
}
Aggregations