aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_selector
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-12 21:03:09 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commit782ae4c049e2b6fab13d7453cbb0e74610e7d200 (patch)
tree1b4cd0a1689cee0c2e2cac2ae9a5fb8ebbe63621 /main/src/ui/conversation_selector
parentd46d071e57e599e8cfb1780597cbecb36881c4d8 (diff)
downloaddino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.tar.gz
dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.zip
Move Jid class to xmpp-vala, partially refactor namespace
Diffstat (limited to 'main/src/ui/conversation_selector')
-rw-r--r--main/src/ui/conversation_selector/chat_row.vala4
-rw-r--r--main/src/ui/conversation_selector/conversation_row.vala1
-rw-r--r--main/src/ui/conversation_selector/groupchat_pm_row.vala1
-rw-r--r--main/src/ui/conversation_selector/groupchat_row.vala2
-rw-r--r--main/src/ui/conversation_selector/list.vala14
5 files changed, 4 insertions, 18 deletions
diff --git a/main/src/ui/conversation_selector/chat_row.vala b/main/src/ui/conversation_selector/chat_row.vala
index 692ad1a5..fb427413 100644
--- a/main/src/ui/conversation_selector/chat_row.vala
+++ b/main/src/ui/conversation_selector/chat_row.vala
@@ -3,6 +3,7 @@ using Gee;
using Gtk;
using Dino.Entities;
+using Xmpp;
namespace Dino.Ui.ConversationSelector {
@@ -18,7 +19,6 @@ public class ChatRow : ConversationRow {
stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect((account, jid, roster_item) => {
if (conversation.account.equals(account) && conversation.counterpart.equals(jid)) {
update_name_label();
- update_avatar();
}
});
}
@@ -41,7 +41,7 @@ public class ChatRow : ConversationRow {
jid_label.label = conversation.counterpart.to_string();
- ArrayList<Jid>? full_jids = stream_interactor.get_module(PresenceManager.IDENTITY).get_full_jids(conversation.counterpart, conversation.account);
+ Gee.List<Jid>? full_jids = stream_interactor.get_module(PresenceManager.IDENTITY).get_full_jids(conversation.counterpart, conversation.account);
if (full_jids != null) {
for (int i = 0; i < full_jids.size; i++) {
inner_box.add(get_fulljid_box(full_jids[i]));
diff --git a/main/src/ui/conversation_selector/conversation_row.vala b/main/src/ui/conversation_selector/conversation_row.vala
index 45e7277a..450ae570 100644
--- a/main/src/ui/conversation_selector/conversation_row.vala
+++ b/main/src/ui/conversation_selector/conversation_row.vala
@@ -4,6 +4,7 @@ using Gtk;
using Pango;
using Dino.Entities;
+using Xmpp;
namespace Dino.Ui.ConversationSelector {
diff --git a/main/src/ui/conversation_selector/groupchat_pm_row.vala b/main/src/ui/conversation_selector/groupchat_pm_row.vala
index 00898f0c..795bdcb6 100644
--- a/main/src/ui/conversation_selector/groupchat_pm_row.vala
+++ b/main/src/ui/conversation_selector/groupchat_pm_row.vala
@@ -15,7 +15,6 @@ public class GroupchatPmRow : ConversationRow {
tooltip.set_custom(generate_tooltip());
return true;
});
- update_avatar();
}
protected override void update_message_label() {
diff --git a/main/src/ui/conversation_selector/groupchat_row.vala b/main/src/ui/conversation_selector/groupchat_row.vala
index 0dfdfe66..fdbfa40b 100644
--- a/main/src/ui/conversation_selector/groupchat_row.vala
+++ b/main/src/ui/conversation_selector/groupchat_row.vala
@@ -8,12 +8,10 @@ public class GroupchatRow : ConversationRow {
base(stream_interactor, conversation);
has_tooltip = true;
set_tooltip_text(conversation.counterpart.bare_jid.to_string());
- update_avatar();
closed.connect(() => {
stream_interactor.get_module(MucManager.IDENTITY).part(conversation.account, conversation.counterpart);
});
- stream_interactor.get_module(MucManager.IDENTITY).left.connect(update_avatar);
}
protected override void update_message_label() {
diff --git a/main/src/ui/conversation_selector/list.vala b/main/src/ui/conversation_selector/list.vala
index 08958cb5..e250c4cd 100644
--- a/main/src/ui/conversation_selector/list.vala
+++ b/main/src/ui/conversation_selector/list.vala
@@ -26,18 +26,6 @@ public class List : ListBox {
stream_interactor.get_module(ConversationManager.IDENTITY).conversation_deactivated.connect(remove_conversation);
stream_interactor.get_module(MessageProcessor.IDENTITY).message_received.connect(on_message_received);
stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect(on_message_received);
- stream_interactor.get_module(PresenceManager.IDENTITY).show_received.connect((show, jid, account) => {
- foreach (Conversation conversation in stream_interactor.get_module(ConversationManager.IDENTITY).get_conversations_for_presence(show, account)) {
- if (rows.has_key(conversation)) rows[conversation].on_show_received(show);
- }
- });
- stream_interactor.get_module(AvatarManager.IDENTITY).received_avatar.connect((avatar, jid, account) => {
- Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid, account);
- if (conversation != null && rows.has_key(conversation)) {
- ChatRow row = rows[conversation] as ChatRow;
- if (row != null) row.update_avatar();
- }
- });
Timeout.add_seconds(60, () => {
foreach (ConversationRow row in rows.values) row.update();
return true;
@@ -99,7 +87,7 @@ public class List : ListBox {
row.closed.connect(() => { select_next_conversation(conversation); });
row.main_revealer.set_reveal_child(true);
}
- invalidate_sort();
+ //invalidate_sort();
}
private void select_next_conversation(Conversation conversation) {