7d6< import java.text.DateFormat;
10d8< import java.util.Collections;
12d9< import java.util.HashMap;
15d11<
20c16,17< import org.jivesoftware.util.Log;
---> import org.slf4j.Logger;> import org.slf4j.LoggerFactory;
22d18<
34a31,32> > private static final Logger Log = LoggerFactory.getLogger(JdbcPersistenceManager.class);
152c150< final HashMap<Long, Conversation> conversations;
---> final List<Conversation> conversations;
157c155< conversations = new HashMap<Long, Conversation>();
---> conversations = new ArrayList<Conversation>();
163a162,166> > if (ownerJid != null && withJid != null && ownerJid.contains(withJid)) {> withJid = null;> }>
204c207,208< querySB.append(" ORDER BY ").append(CONVERSATION_ID);
---> querySB.append(" GROUP BY ").append(CONVERSATION_ID);> querySB.append(" ORDER BY ").append(CONVERSATION_ID).append(" ").append(JiveGlobals.getProperty("conversation.list.order", ""));
218c222< conversations.put(conv.getId(), conv);
---> conversations.add(conv);
226,230c230,232< if (xmppResultSet != null && conversations.size() > 0) {< ArrayList<Long> sortedConvKeys = new ArrayList<Long>(conversations.keySet());< Collections.sort(sortedConvKeys);< xmppResultSet.setFirst(sortedConvKeys.get(0));< xmppResultSet.setLast(sortedConvKeys.get(sortedConvKeys.size() - 1));
---> if (xmppResultSet != null && !conversations.isEmpty()) {> xmppResultSet.setFirst(conversations.get(0).getId());> xmppResultSet.setLast(conversations.get(conversations.size() - 1).getId());
232c234< return conversations.values();
---> return conversations;
↧
Re: Archive Conversations list and count doesn't match
↧