add extra to disregard first-time dialog to main activity
This commit is contained in:
@@ -51,6 +51,8 @@ public class MainActivity extends BaseNfcActivity implements FabContainer, OnBac
|
|||||||
private static final int ID_SETTINGS = 4;
|
private static final int ID_SETTINGS = 4;
|
||||||
private static final int ID_HELP = 5;
|
private static final int ID_HELP = 5;
|
||||||
|
|
||||||
|
public static final String EXTRA_SKIP_FIRST_TIME = "skip_first_time";
|
||||||
|
|
||||||
public Drawer.Result mDrawerResult;
|
public Drawer.Result mDrawerResult;
|
||||||
private Toolbar mToolbar;
|
private Toolbar mToolbar;
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ public class MainActivity extends BaseNfcActivity implements FabContainer, OnBac
|
|||||||
|
|
||||||
// if this is the first time show first time activity
|
// if this is the first time show first time activity
|
||||||
Preferences prefs = Preferences.getPreferences(this);
|
Preferences prefs = Preferences.getPreferences(this);
|
||||||
if (prefs.isFirstTime()) {
|
if (!getIntent().getBooleanExtra(EXTRA_SKIP_FIRST_TIME, false) && prefs.isFirstTime()) {
|
||||||
Intent intent = new Intent(this, CreateKeyActivity.class);
|
Intent intent = new Intent(this, CreateKeyActivity.class);
|
||||||
intent.putExtra(CreateKeyActivity.EXTRA_FIRST_TIME, true);
|
intent.putExtra(CreateKeyActivity.EXTRA_FIRST_TIME, true);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|||||||
Reference in New Issue
Block a user