corrected a bug where the activity finishes before the dialog is dismissed
This commit is contained in:
parent
77a4027ce5
commit
ffadf9e8b6
1 changed files with 2 additions and 3 deletions
|
@ -465,14 +465,13 @@ public class PgpHandler extends Activity {
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
(new File(getIntent().getExtras().getString("FILE_PATH"))).delete();
|
(new File(getIntent().getExtras().getString("FILE_PATH"))).delete();
|
||||||
|
|
||||||
|
setResult(RESULT_CANCELED);
|
||||||
Git git = new Git(PasswordRepository.getRepository(new File("")));
|
Git git = new Git(PasswordRepository.getRepository(new File("")));
|
||||||
GitAsyncTask tasks = new GitAsyncTask(activity, false);
|
GitAsyncTask tasks = new GitAsyncTask(activity, true);
|
||||||
tasks.execute(
|
tasks.execute(
|
||||||
git.rm().addFilepattern(getIntent().getExtras().getString("FILE_PATH").replace(PasswordRepository.getWorkTree() + "/", "")),
|
git.rm().addFilepattern(getIntent().getExtras().getString("FILE_PATH").replace(PasswordRepository.getWorkTree() + "/", "")),
|
||||||
git.commit().setMessage("[ANDROID PwdStore] Remove " + getIntent().getExtras().getString("FILE_PATH") + " from store.")
|
git.commit().setMessage("[ANDROID PwdStore] Remove " + getIntent().getExtras().getString("FILE_PATH") + " from store.")
|
||||||
);
|
);
|
||||||
setResult(RESULT_CANCELED);
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton("NO", new DialogInterface.OnClickListener() {
|
.setNegativeButton("NO", new DialogInterface.OnClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue