Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions src/ConversationList/ConversationList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

public class Mail.ConversationList : Gtk.Box {
public signal void conversation_selected (Camel.FolderThreadNode? node);
public signal void conversation_focused (Camel.FolderThreadNode? node);

private const int MARK_READ_TIMEOUT_SECONDS = 5;

Expand Down Expand Up @@ -170,19 +169,13 @@ public class Mail.ConversationList : Gtk.Box {
mark_read_timeout_id = 0;
}

if (row == null) {
conversation_focused (null);
} else {
conversation_focused (((ConversationItemModel) row).node);

if (((ConversationItemModel) row).unread) {
mark_read_timeout_id = GLib.Timeout.add_seconds (MARK_READ_TIMEOUT_SECONDS, () => {
set_thread_flag (((ConversationItemModel) row).node, Camel.MessageFlags.SEEN);
if (row != null && ((ConversationItemModel) row).unread) {
mark_read_timeout_id = GLib.Timeout.add_seconds (MARK_READ_TIMEOUT_SECONDS, () => {
set_thread_flag (((ConversationItemModel) row).node, Camel.MessageFlags.SEEN);

mark_read_timeout_id = 0;
return false;
});
}
mark_read_timeout_id = 0;
return Source.REMOVE;
});
}
});

Expand Down Expand Up @@ -233,7 +226,6 @@ public class Mail.ConversationList : Gtk.Box {
cancellable.cancel ();
}

conversation_focused (null);
conversation_selected (null);

uint previous_items = list_store.get_n_items ();
Expand Down
Loading