From 57c3952fdf7949b27e73006acb2a59258d2d9213 Mon Sep 17 00:00:00 2001 From: "isaac.jones" Date: Sun, 18 Jan 2009 01:01:39 +0000 Subject: [PATCH] Fix bug where item gets created twice when user hits "save" since the item is saved during onPause as well as saved. Repaired by setting the row id when adding the password for the first time since this prevents the 2nd time around from adding it again. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1759 72b678ce-9140-0410-bee8-679b907dd61a --- src/org/openintents/safe/PassEdit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/openintents/safe/PassEdit.java b/src/org/openintents/safe/PassEdit.java index 3f1df13..58cf7f5 100644 --- a/src/org/openintents/safe/PassEdit.java +++ b/src/org/openintents/safe/PassEdit.java @@ -185,7 +185,7 @@ public class PassEdit extends Activity { } if (RowId == null || RowId == -1) { - dbHelper.addPassword(entry); + RowId = dbHelper.addPassword(entry); } else { PassEntry storedEntry = dbHelper.fetchPassword (RowId); //update fields that aren't set in the UI: -- 2.50.1