mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Use .equals for URL
This commit is contained in:
parent
b3b1c99435
commit
23aa3de53f
1 changed files with 3 additions and 3 deletions
|
|
@ -33,14 +33,14 @@ public class SignupActivity extends Activity {
|
|||
private class MyWebViewClient extends WebViewClient {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (Uri.parse(url).getHost().equals("https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes")) {
|
||||
if (url.equals("https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes")) {
|
||||
// Signup success, so load LoginActivity again
|
||||
Log.d("SignupActivity", "Overriding URL");
|
||||
Log.d("SignupActivity", "Overriding URL" + url);
|
||||
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} else {
|
||||
Log.d("SignupActivity", "Not overriding URL, URL is: " + Uri.parse(url).getHost());
|
||||
Log.d("SignupActivity", "Not overriding URL, URL is: " + url);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue