mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
- switch if branch for easier readability
- show snackbar only for webview (for old login there is a decent error warning)
This commit is contained in:
parent
43747c8e76
commit
9174397939
1 changed files with 7 additions and 6 deletions
|
@ -1811,20 +1811,21 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
}
|
||||
|
||||
} else { // authorization fail due to client side - probably wrong credentials
|
||||
if (!webViewLoginMethod) {
|
||||
updateAuthStatusIconAndText(result);
|
||||
showAuthStatus();
|
||||
} else {
|
||||
if (webViewLoginMethod) {
|
||||
mLoginWebView = (WebView) findViewById(R.id.login_webview);
|
||||
initWebViewLogin(mServerInfo.mBaseUrl);
|
||||
|
||||
Snackbar.make(mLoginWebView, getString(R.string.auth_access_failed) + ": " + result.getLogMessage(),
|
||||
Snackbar.LENGTH_LONG).show();
|
||||
} else {
|
||||
updateAuthStatusIconAndText(result);
|
||||
showAuthStatus();
|
||||
}
|
||||
// reset webview
|
||||
webViewPassword = null;
|
||||
webViewUser = null;
|
||||
deleteCookies();
|
||||
|
||||
Snackbar.make(mLoginWebView, getString(R.string.auth_access_failed) + ": " + result.getLogMessage(),
|
||||
Snackbar.LENGTH_LONG).show();
|
||||
Log_OC.d(TAG, "Access failed: " + result.getLogMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue