[geary/wip/mark-cleanup-714008] Clean up mark as read/unread star/unstar options
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/mark-cleanup-714008] Clean up mark as read/unread star/unstar options
- Date: Sat, 8 Mar 2014 00:21:05 +0000 (UTC)
commit 9d53d78fe7e30c48686bb2d319c58152c2a949c2
Author: Charles Lindsay <chaz yorba org>
Date: Fri Mar 7 16:20:10 2014 -0800
Clean up mark as read/unread star/unstar options
src/client/application/geary-controller.vala | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index c3429af..1fdb421 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1375,12 +1375,12 @@ public class GearyController : Geary.BaseObject {
}
private Gee.ArrayList<Geary.EmailIdentifier> get_conversation_email_ids(
- Geary.App.Conversation conversation, bool preview_message_only,
+ Geary.App.Conversation conversation, bool latest_in_folder_only,
Gee.ArrayList<Geary.EmailIdentifier> add_to) {
- if (preview_message_only) {
- Geary.Email? preview = conversation.get_latest_email(Geary.App.Conversation.Location.ANYWHERE);
- if (preview != null)
- add_to.add(preview.id);
+ if (latest_in_folder_only) {
+ Geary.Email? latest = conversation.get_latest_email(Geary.App.Conversation.Location.IN_FOLDER);
+ if (latest != null)
+ add_to.add(latest.id);
} else {
add_to.add_all(conversation.get_email_ids());
}
@@ -1389,20 +1389,20 @@ public class GearyController : Geary.BaseObject {
}
private Gee.Collection<Geary.EmailIdentifier> get_conversation_collection_email_ids(
- Gee.Collection<Geary.App.Conversation> conversations, bool preview_message_only = false) {
+ Gee.Collection<Geary.App.Conversation> conversations, bool latest_in_folder_only = false) {
Gee.ArrayList<Geary.EmailIdentifier> ret = new Gee.ArrayList<Geary.EmailIdentifier>();
foreach(Geary.App.Conversation c in conversations)
- get_conversation_email_ids(c, preview_message_only, ret);
+ get_conversation_email_ids(c, latest_in_folder_only, ret);
return ret;
}
private Gee.ArrayList<Geary.EmailIdentifier> get_selected_email_ids(
- bool preview_messages_only) {
+ bool latest_in_folder_only) {
Gee.ArrayList<Geary.EmailIdentifier> ids = new Gee.ArrayList<Geary.EmailIdentifier>();
foreach (Geary.App.Conversation conversation in selected_conversations)
- get_conversation_email_ids(conversation, preview_messages_only, ids);
+ get_conversation_email_ids(conversation, latest_in_folder_only, ids);
return ids;
}
@@ -1490,8 +1490,8 @@ public class GearyController : Geary.BaseObject {
private void on_mark_conversations(Gee.Collection<Geary.App.Conversation> conversations,
Geary.EmailFlags? flags_to_add, Geary.EmailFlags? flags_to_remove,
- bool only_mark_preview = false) {
- mark_email(get_conversation_collection_email_ids(conversations, only_mark_preview),
+ bool only_mark_latest_in_folder = false) {
+ mark_email(get_conversation_collection_email_ids(conversations, only_mark_latest_in_folder),
flags_to_add, flags_to_remove);
}
@@ -1515,7 +1515,7 @@ public class GearyController : Geary.BaseObject {
Geary.EmailFlags flags = new Geary.EmailFlags();
flags.add(Geary.EmailFlags.UNREAD);
- Gee.ArrayList<Geary.EmailIdentifier> ids = get_selected_email_ids(false);
+ Gee.ArrayList<Geary.EmailIdentifier> ids = get_selected_email_ids(true);
mark_email(ids, flags, null);
foreach (Geary.EmailIdentifier id in ids)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]