diff --git a/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java b/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java
index 247c9e422..47816e2e6 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java
@@ -169,7 +169,6 @@ public class ShareActivity
else //Send user to login activity
{
Toast.makeText(this, "You need to login first!", Toast.LENGTH_SHORT).show();
- applicationPrefs.edit().putBoolean("login_skipped", false).apply();
Intent loginIntent = new Intent(ShareActivity.this, LoginActivity.class);
startActivity(loginIntent);
}
@@ -311,6 +310,12 @@ public class ShareActivity
checkIfFileExists();
gpsObj = fileObj.processFileCoordinates(locationPermitted);
decimalCoords = fileObj.getDecimalCoords();
+ if (sessionManager.getCurrentAccount() == null) {
+ Toast.makeText(this, getString(R.string.login_alert_message), Toast.LENGTH_SHORT).show();
+ applicationPrefs.edit().putBoolean("login_skipped", false).apply();
+ Intent loginIntent = new Intent(ShareActivity.this, LoginActivity.class);
+ startActivity(loginIntent);
+ }
}
/**
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cafab6ed8..cf3d4d422 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -250,7 +250,7 @@
Log in
Do you really want to skip login?
You will not be able to upload pictures.
- This feature requires user to be logged in!
+ Please log in to use this feature
Location has not changed.
Location not available.