Skip to content

Commit

Permalink
Backup before deleting a book
Browse files Browse the repository at this point in the history
  • Loading branch information
rivaldi8 committed Feb 10, 2018
1 parent 394ef4f commit 589acb6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.gnucash.android.R;
import org.gnucash.android.db.adapter.BooksDbAdapter;
import org.gnucash.android.ui.common.Refreshable;
import org.gnucash.android.util.BackupManager;

/**
* Confirmation dialog for deleting a book.
Expand Down Expand Up @@ -52,6 +53,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
final String bookUID = getArguments().getString("bookUID");
BackupManager.backupBook(bookUID);
BooksDbAdapter.getInstance().deleteBook(bookUID);
((Refreshable) getTargetFragment()).refresh();
}
Expand Down

0 comments on commit 589acb6

Please sign in to comment.