aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary/conversation_item.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-27 23:55:49 +0200
committerfiaxh <git@mx.ax.lt>2017-08-28 00:02:59 +0200
commit8bc0d107e740be468ee0c9dcd253de36355088d3 (patch)
tree36858e844d711eb18a68612fd815cb84f4c3a88f /main/src/ui/conversation_summary/conversation_item.vala
parenta807ded65cd907e04bab7b8cd27b5702b157e3a2 (diff)
downloaddino-8bc0d107e740be468ee0c9dcd253de36355088d3.tar.gz
dino-8bc0d107e740be468ee0c9dcd253de36355088d3.zip
Plugins providing conversation items for ConversationView
Diffstat (limited to 'main/src/ui/conversation_summary/conversation_item.vala')
-rw-r--r--main/src/ui/conversation_summary/conversation_item.vala32
1 files changed, 0 insertions, 32 deletions
diff --git a/main/src/ui/conversation_summary/conversation_item.vala b/main/src/ui/conversation_summary/conversation_item.vala
deleted file mode 100644
index a99025ab..00000000
--- a/main/src/ui/conversation_summary/conversation_item.vala
+++ /dev/null
@@ -1,32 +0,0 @@
-using Dino.Entities;
-
-namespace Dino.Ui.ConversationSummary {
-
-public enum MessageKind {
- TEXT,
- ME_COMMAND
-}
-
-public MessageKind get_message_kind(Message message) {
- if (message.body.has_prefix("/me ")) {
- return MessageKind.ME_COMMAND;
- } else {
- return MessageKind.TEXT;
- }
-}
-
-public interface ConversationItem : Gtk.Widget {
- public abstract bool merge(Entities.Message message);
-
- public static ConversationItem create_for_message(StreamInteractor stream_interactor, Conversation conversation, Message message) {
- switch (get_message_kind(message)) {
- case MessageKind.TEXT:
- return new MergedMessageItem(stream_interactor, conversation, message);
- case MessageKind.ME_COMMAND:
- return new SlashMeItem(stream_interactor, conversation, message);
- }
- assert_not_reached();
- }
-}
-
-} \ No newline at end of file