From ffadf9e8b6746c0bf00160e79ac59f4e0416f4f0 Mon Sep 17 00:00:00 2001 From: knuthy Date: Sun, 10 Aug 2014 22:11:27 +0100 Subject: corrected a bug where the activity finishes before the dialog is dismissed --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/com') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 9655180e..35404c76 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -465,14 +465,13 @@ public class PgpHandler extends Activity { public void onClick(DialogInterface dialogInterface, int i) { (new File(getIntent().getExtras().getString("FILE_PATH"))).delete(); + setResult(RESULT_CANCELED); Git git = new Git(PasswordRepository.getRepository(new File(""))); - GitAsyncTask tasks = new GitAsyncTask(activity, false); + GitAsyncTask tasks = new GitAsyncTask(activity, true); tasks.execute( git.rm().addFilepattern(getIntent().getExtras().getString("FILE_PATH").replace(PasswordRepository.getWorkTree() + "/", "")), git.commit().setMessage("[ANDROID PwdStore] Remove " + getIntent().getExtras().getString("FILE_PATH") + " from store.") ); - setResult(RESULT_CANCELED); - finish(); } }) .setNegativeButton("NO", new DialogInterface.OnClickListener() { -- cgit v1.2.3