mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Added toast to notify user
This commit is contained in:
parent
6bd00b3f44
commit
4726e8b072
1 changed files with 5 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import android.webkit.WebResourceResponse;
|
|||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ public class SignupActivity extends Activity {
|
|||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (url.equals("https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes")) {
|
||||
//Signup success, so load LoginActivity again
|
||||
//Signup success, so clear cookies, notify user, and load LoginActivity again
|
||||
Log.d("SignupActivity", "Overriding URL" + url);
|
||||
|
||||
CookieSyncManager.createInstance(getApplicationContext());
|
||||
|
|
@ -49,6 +50,9 @@ public class SignupActivity extends Activity {
|
|||
cookieManager.setAcceptCookie(false);
|
||||
cookieManager.removeSessionCookie();
|
||||
|
||||
Toast toast = Toast.makeText(getApplicationContext(), "Account created!", Toast.LENGTH_LONG);
|
||||
toast.show();
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
|
||||
intent.putExtra("Redirected", true);
|
||||
startActivity(intent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue