mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Share from gallery for not loggedin fixed
This commit is contained in:
parent
67563e01df
commit
23a195f486
2 changed files with 4 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import android.os.Handler;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.RequiresApi;
|
import android.support.annotation.RequiresApi;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
|
@ -94,6 +95,7 @@ public class ShareActivity
|
||||||
ModifierSequenceDao modifierSequenceDao;
|
ModifierSequenceDao modifierSequenceDao;
|
||||||
@Inject
|
@Inject
|
||||||
CategoryApi apiCall;
|
CategoryApi apiCall;
|
||||||
|
@Inject @Named("application_preferences") SharedPreferences applicationPrefs;
|
||||||
@Inject
|
@Inject
|
||||||
@Named("default_preferences")
|
@Named("default_preferences")
|
||||||
SharedPreferences prefs;
|
SharedPreferences prefs;
|
||||||
|
|
@ -167,6 +169,7 @@ public class ShareActivity
|
||||||
else //Send user to login activity
|
else //Send user to login activity
|
||||||
{
|
{
|
||||||
Toast.makeText(this, "You need to login first!", Toast.LENGTH_SHORT).show();
|
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);
|
Intent loginIntent = new Intent(ShareActivity.this, LoginActivity.class);
|
||||||
startActivity(loginIntent);
|
startActivity(loginIntent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue