diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-24 10:50:18 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-24 10:50:18 +0100 |
commit | 92465091c68fc82f914866c27f767015bc756fb6 (patch) | |
tree | 33b976403aae684fe223669494f0a3472b9b5e90 /src/de/gultsch/chat/ConversationList.java | |
parent | 35f8ab58f4b6f97f02031b056d2a5f6f993672cf (diff) |
some history fixes
Diffstat (limited to 'src/de/gultsch/chat/ConversationList.java')
-rw-r--r-- | src/de/gultsch/chat/ConversationList.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/ConversationList.java b/src/de/gultsch/chat/ConversationList.java index b043f61a..205d3549 100644 --- a/src/de/gultsch/chat/ConversationList.java +++ b/src/de/gultsch/chat/ConversationList.java @@ -38,4 +38,9 @@ public class ConversationList extends ArrayList<Conversation> { this.selectedConversationPosition = this.indexOf(selectedConversation); } + + public synchronized int addAndReturnPosition(Conversation conversation) { + this.add(conversation); + return size() - 1; + } } |