# HG changeset patch # User nikita@nikita-rack # Date 1240343523 -7200 # Node ID 4eaf1efcadda3600a3112bc9cf98e6571fb4e3c3 # Parent 2c4be059fc8bc95c4b14c55992d297e806a7f4bd ca devrait etre bon pour la presence a la connection diff -r 2c4be059fc8b -r 4eaf1efcadda src/com/beem/project/beem/service/RosterAdapter.java --- a/src/com/beem/project/beem/service/RosterAdapter.java Tue Apr 21 20:10:21 2009 +0200 +++ b/src/com/beem/project/beem/service/RosterAdapter.java Tue Apr 21 21:52:03 2009 +0200 @@ -42,13 +42,16 @@ * @param roster the roster to adapt */ public RosterAdapter(final Roster roster) { - Log.d(TAG, "CTOR"); mAdaptee = roster; roster.addRosterListener(mRosterListener); for (RosterEntry entry : roster.getEntries()) { String user = StringUtils.parseBareAddress(entry.getUser()); - if (!mContacts.containsKey(user)) - mContacts.put(user, new Contact(user)); + if (!mContacts.containsKey(user)) { + Contact c = new Contact(user); + c.setStatus(roster.getPresence(user)); + mContacts.put(user, c); + + } } } diff -r 2c4be059fc8b -r 4eaf1efcadda src/com/beem/project/beem/ui/AccountCreation.java --- a/src/com/beem/project/beem/ui/AccountCreation.java Tue Apr 21 20:10:21 2009 +0200 +++ b/src/com/beem/project/beem/ui/AccountCreation.java Tue Apr 21 21:52:03 2009 +0200 @@ -96,7 +96,7 @@ xmmpCo.connect(); AccountManager accM = new AccountManager(xmmpCo); accM.createAccount(mAttributes.get("login"), mAttributes.get("password"), mAttributes); - + xmmpCo.disconnect(); SharedPreferences.Editor editor = mSettings.edit(); editor.putString(getString(R.string.PreferenceLoginKey), mAttributes.get("login"));