aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/unified_window_controller.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-04-12 16:24:43 +0200
committerfiaxh <git@lightrise.org>2019-04-14 09:46:54 +0200
commitd9e45071d0d3cd5a7a162908267c98c6366038bf (patch)
tree1d68dcd4010b5c057b1d862f9ece8013212c2575 /main/src/ui/unified_window_controller.vala
parent27fe07c3b41a53a276fb5f6a71c4c97cb0279170 (diff)
downloaddino-d9e45071d0d3cd5a7a162908267c98c6366038bf.tar.gz
dino-d9e45071d0d3cd5a7a162908267c98c6366038bf.zip
Only use UI data for active converations cycling, clean up ConversationSelector
Diffstat (limited to 'main/src/ui/unified_window_controller.vala')
-rw-r--r--main/src/ui/unified_window_controller.vala13
1 files changed, 2 insertions, 11 deletions
diff --git a/main/src/ui/unified_window_controller.vala b/main/src/ui/unified_window_controller.vala
index ce15ecc9..912b235c 100644
--- a/main/src/ui/unified_window_controller.vala
+++ b/main/src/ui/unified_window_controller.vala
@@ -79,7 +79,7 @@ public class UnifiedWindowController : Object {
window.accounts_placeholder.primary_button.clicked.connect(() => { app.activate_action("accounts", null); });
window.conversations_placeholder.primary_button.clicked.connect(() => { app.activate_action("add_chat", null); });
window.conversations_placeholder.secondary_button.clicked.connect(() => { app.activate_action("add_conference", null); });
- window.filterable_conversation_list.conversation_list.conversation_selected.connect((conversation) => select_conversation(conversation));
+ window.filterable_conversation_list.conversation_selected.connect((conversation) => select_conversation(conversation));
var vadjustment = window.conversation_frame.scrolled.vadjustment;
vadjustment.notify["value"].connect(() => {
@@ -131,7 +131,7 @@ public class UnifiedWindowController : Object {
stream_interactor.get_module(ChatInteraction.IDENTITY).on_conversation_selected(conversation);
conversation.active = true; // only for conversation_selected
- window.filterable_conversation_list.conversation_list.on_conversation_selected(conversation); // only for conversation_opened
+ window.filterable_conversation_list.on_conversation_selected(conversation); // only for conversation_opened
if (do_reset_search) {
reset_search_entry();
@@ -142,15 +142,6 @@ public class UnifiedWindowController : Object {
}
}
- public void loop_conversations(bool backwards = false) {
- Gee.List<Conversation> conversations = stream_interactor.get_module(ConversationManager.IDENTITY).get_active_conversations();
- conversations.sort((a, b) => { return b.last_active.compare(a.last_active); });
- int index = conversations.index_of(this.conversation);
- index += backwards ? -1 : 1;
- select_conversation(conversations.get(index % conversations.size));
- }
-
-
private void update_conversation_display_name() {
conversation_display_name = Util.get_conversation_display_name(stream_interactor, conversation);
}