diff options
author | steckbrief <steckbrief@chefmail.de> | 2018-05-11 19:49:27 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2018-05-11 19:49:27 +0200 |
commit | bff97731deed4c599dcb6c3a2887c9f47165dd3f (patch) | |
tree | 1a1479be225fef127146f58d69f32a947c4d013e /src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java | |
parent | 1d8c547b447d68daf079d9db2b1d792fc631e462 (diff) |
introduces JidUtil for Jid creation, fixes duplication of childs while adding childs with xmlns and name
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java index fd227e5a..d006628e 100644 --- a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java +++ b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java @@ -50,6 +50,7 @@ import de.thedevstack.conversationsplus.persistance.db.access.MessageDatabaseAcc import de.thedevstack.conversationsplus.utils.SimpleCryptoUtil; import de.thedevstack.conversationsplus.xmpp.jid.InvalidJidException; import de.thedevstack.conversationsplus.xmpp.jid.Jid; +import de.thedevstack.conversationsplus.xmpp.jid.JidUtil; public class DatabaseBackend extends SQLiteOpenHelper { @@ -297,7 +298,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newJid; try { - newJid = Jid.fromString( + newJid = JidUtil.fromString( cursor.getString(cursor.getColumnIndex(Conversation.CONTACTJID)) ).toString(); } catch (InvalidJidException ignored) { @@ -322,7 +323,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newJid; try { - newJid = Jid.fromString( + newJid = JidUtil.fromString( cursor.getString(cursor.getColumnIndex(Contact.JID)) ).toString(); } catch (InvalidJidException ignored) { @@ -349,7 +350,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { String newServer; try { - newServer = Jid.fromParts( + newServer = JidUtil.fromParts( cursor.getString(cursor.getColumnIndex(Account.USERNAME)), cursor.getString(cursor.getColumnIndex(Account.SERVER)), "mobile" |