mirror of
https://github.com/moparisthebest/keepass2android
synced 2025-01-11 05:28:34 -05:00
Bugfix with auto-open db
This commit is contained in:
parent
56ca74a3d9
commit
fcae4fcbb6
@ -562,6 +562,7 @@ namespace keepass2android
|
||||
private void GoToFileSelectActivity()
|
||||
{
|
||||
Intent intent = new Intent(this, typeof (FileSelectActivity));
|
||||
intent.PutExtra(FileSelectActivity.NoForwardToPasswordActivity, true);
|
||||
AppTask.ToIntent(intent);
|
||||
StartActivityForResult(intent, 0);
|
||||
Finish();
|
||||
|
@ -65,6 +65,8 @@ namespace keepass2android
|
||||
internal AppTask AppTask;
|
||||
private IOConnectionInfo _iocToLaunch;
|
||||
|
||||
public const string NoForwardToPasswordActivity = "NoForwardToPasswordActivity";
|
||||
|
||||
void ShowFilenameDialog(bool showOpenButton, bool showCreateButton, bool showBrowseButton, string defaultFilename, string detailsText, int requestCodeBrowse)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
@ -583,10 +585,11 @@ namespace keepass2android
|
||||
else
|
||||
{
|
||||
//if no database is loaded: load the most recent database
|
||||
if (_DbHelper.HasRecentFiles())
|
||||
if ( (Intent.GetBooleanExtra(NoForwardToPasswordActivity, false)==false) && _DbHelper.HasRecentFiles())
|
||||
{
|
||||
Android.Database.ICursor filesCursor = _DbHelper.FetchAllFiles();
|
||||
StartManagingCursor(filesCursor);
|
||||
filesCursor.MoveToFirst();
|
||||
IOConnectionInfo ioc = _DbHelper.CursorToIoc(filesCursor);
|
||||
if (App.Kp2a.GetFileStorage(ioc).RequiredSetup == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user