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