[geary/wip/mark-cleanup-714008] Use in folder if available, then out of folder
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/mark-cleanup-714008] Use in folder if available, then out of folder
- Date: Sat, 8 Mar 2014 00:39:08 +0000 (UTC)
commit 59fe70cab9bcce5fdff2b5b6563d2ffabd49f1ee
Author: Charles Lindsay <chaz yorba org>
Date: Fri Mar 7 16:33:57 2014 -0800
Use in folder if available, then out of folder
This fixes the case for marking from the search folder.
src/client/application/geary-controller.vala | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 1fdb421..f82f56e 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1375,10 +1375,11 @@ public class GearyController : Geary.BaseObject {
}
private Gee.ArrayList<Geary.EmailIdentifier> get_conversation_email_ids(
- Geary.App.Conversation conversation, bool latest_in_folder_only,
+ Geary.App.Conversation conversation, bool latest_only,
Gee.ArrayList<Geary.EmailIdentifier> add_to) {
- if (latest_in_folder_only) {
- Geary.Email? latest = conversation.get_latest_email(Geary.App.Conversation.Location.IN_FOLDER);
+ if (latest_only) {
+ Geary.Email? latest = conversation.get_latest_email(
+ Geary.App.Conversation.Location.IN_FOLDER_OUT_OF_FOLDER);
if (latest != null)
add_to.add(latest.id);
} else {
@@ -1389,20 +1390,20 @@ public class GearyController : Geary.BaseObject {
}
private Gee.Collection<Geary.EmailIdentifier> get_conversation_collection_email_ids(
- Gee.Collection<Geary.App.Conversation> conversations, bool latest_in_folder_only = false) {
+ Gee.Collection<Geary.App.Conversation> conversations, bool latest_only = false) {
Gee.ArrayList<Geary.EmailIdentifier> ret = new Gee.ArrayList<Geary.EmailIdentifier>();
foreach(Geary.App.Conversation c in conversations)
- get_conversation_email_ids(c, latest_in_folder_only, ret);
+ get_conversation_email_ids(c, latest_only, ret);
return ret;
}
private Gee.ArrayList<Geary.EmailIdentifier> get_selected_email_ids(
- bool latest_in_folder_only) {
+ bool latest_only) {
Gee.ArrayList<Geary.EmailIdentifier> ids = new Gee.ArrayList<Geary.EmailIdentifier>();
foreach (Geary.App.Conversation conversation in selected_conversations)
- get_conversation_email_ids(conversation, latest_in_folder_only, ids);
+ get_conversation_email_ids(conversation, latest_only, ids);
return ids;
}
@@ -1490,8 +1491,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_latest_in_folder = false) {
- mark_email(get_conversation_collection_email_ids(conversations, only_mark_latest_in_folder),
+ bool latest_only = false) {
+ mark_email(get_conversation_collection_email_ids(conversations, latest_only),
flags_to_add, flags_to_remove);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]