[geary] Close folders in reverse order. Bug 778968
- From: Gautier Pelloux-Prayer <gpelloux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Close folders in reverse order. Bug 778968
- Date: Sun, 26 Feb 2017 21:35:52 +0000 (UTC)
commit 71ac4de3679774b2153147de539a870a41d24bb8
Author: Gautier Pelloux-Prayer <gautier+git damsy net>
Date: Mon Feb 20 18:18:58 2017 +0100
Close folders in reverse order. Bug 778968
src/client/application/geary-controller.vala | 7 ++++---
src/engine/api/geary-account.vala | 8 ++++----
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 896084a..51638d2 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1636,8 +1636,8 @@ public class GearyController : Geary.BaseObject {
return null;
}
- private void on_folders_available_unavailable(Gee.Collection<Geary.Folder>? available,
- Gee.Collection<Geary.Folder>? unavailable) {
+ private void on_folders_available_unavailable(Gee.List<Geary.Folder>? available,
+ Gee.List<Geary.Folder>? unavailable) {
if (available != null && available.size > 0) {
foreach (Geary.Folder folder in available) {
main_window.folder_list.add_folder(folder);
@@ -1671,7 +1671,8 @@ public class GearyController : Geary.BaseObject {
}
if (unavailable != null) {
- foreach (Geary.Folder folder in unavailable) {
+ for (int i = (unavailable.size - 1); i >= 0; i--) {
+ Geary.Folder folder = unavailable[i];
main_window.folder_list.remove_folder(folder);
if (folder.account == current_account) {
if (main_window.main_toolbar.copy_folder_menu.has_folder(folder))
diff --git a/src/engine/api/geary-account.vala b/src/engine/api/geary-account.vala
index a301559..b8eedcd 100644
--- a/src/engine/api/geary-account.vala
+++ b/src/engine/api/geary-account.vala
@@ -55,8 +55,8 @@ public abstract class Geary.Account : BaseObject {
* they're created later; they become unavailable when the account is
* closed or they're deleted later.
*
- * Folders are ordered for the convenience of the caller from the top of the heirarchy to
- * lower in the heirarchy. In other words, parents are listed before children, assuming the
+ * Folders are ordered for the convenience of the caller from the top of the hierarchy to
+ * lower in the hierarchy. In other words, parents are listed before children, assuming the
* lists are traversed in natural order.
*
* @see sort_by_path
@@ -67,8 +67,8 @@ public abstract class Geary.Account : BaseObject {
/**
* Fired when folders are created or deleted.
*
- * Folders are ordered for the convenience of the caller from the top of the heirarchy to
- * lower in the heirarchy. In other words, parents are listed before children, assuming the
+ * Folders are ordered for the convenience of the caller from the top of the hierarchy to
+ * lower in the hierarchy. In other words, parents are listed before children, assuming the
* lists are traversed in natural order.
*
* @see sort_by_path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]