From e61dbe86aea41031f766941bdaf026dba33a0718 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 13 Mar 2010 14:55:19 +0100 Subject: [PATCH] Attach identity on loading server from database --- src/org/yaaic/db/Database.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/yaaic/db/Database.java b/src/org/yaaic/db/Database.java index b533171..461f29f 100644 --- a/src/org/yaaic/db/Database.java +++ b/src/org/yaaic/db/Database.java @@ -175,6 +175,10 @@ public class Database extends SQLiteOpenHelper server.setId(cursor.getInt(cursor.getColumnIndex((ServerConstants._ID)))); server.setStatus(Status.DISCONNECTED); + // Load identity for server + Identity identity = this.getIdentityById(cursor.getInt(cursor.getColumnIndex(ServerConstants.IDENTITY))); + server.setIdentity(identity); + servers.put(server.getId(), server); } cursor.close();