diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-02 15:51:20 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-02 15:51:20 +0200 |
commit | 0ae852a6331a06b169152084719c0692db05ac5d (patch) | |
tree | 404964ed30f75dd6182245fdee4dd68934fdd485 /src/eu/siacs/conversations/services | |
parent | 2c9b2e6bf8dedf0a2a9eaae2d4eca1a3a251b00e (diff) |
refactored share with activity
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 2656f7c6..98f278bd 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -784,10 +784,22 @@ public class XmppConnectionService extends Service { return this.conversations; } - + public void populateWithOrderedConversations(List<Conversation> list) { + populateWithOrderedConversations(list,true); + } + + public void populateWithOrderedConversations(List<Conversation> list, boolean includeConferences) { list.clear(); - list.addAll(getConversations()); + if (includeConferences) { + list.addAll(getConversations()); + } else { + for(Conversation conversation : getConversations()) { + if (conversation.getMode() == Conversation.MODE_SINGLE) { + list.add(conversation); + } + } + } Collections.sort(list, new Comparator<Conversation>() { @Override public int compare(Conversation lhs, Conversation rhs) { |