ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject incubator-ponymail git commit: actually close all emails
Date Mon, 05 Sep 2016 07:18:07 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake 50594ffa5 -> 6fd100c06


actually close all emails

the remove-by-value caused the loop to fail


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/6fd100c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/6fd100c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/6fd100c0

Branch: refs/heads/coffee-and-cake
Commit: 6fd100c067eec61a02bc43ebc6bf092f6eff0acc
Parents: 50594ff
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Mon Sep 5 09:17:56 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Mon Sep 5 09:17:56 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/keyboard_shortcuts.coffee | 4 ++--
 site/js/ponymail-coffee.js               | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/6fd100c0/site/js/coffee/keyboard_shortcuts.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/keyboard_shortcuts.coffee b/site/js/coffee/keyboard_shortcuts.coffee
index ca7a0ad..a379623 100644
--- a/site/js/coffee/keyboard_shortcuts.coffee
+++ b/site/js/coffee/keyboard_shortcuts.coffee
@@ -39,8 +39,8 @@ dealWithKeyboard = (e) ->
                     ponymail_current_email.hide()
                 else
                     ### Close all email ? ###
-                    for email in ponymail_email_open
-                        email.hide()
+                    while ponymail_email_open.length > 0
+                        ponymail_email_open[0].hide()
 
                     
                     

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/6fd100c0/site/js/ponymail-coffee.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail-coffee.js b/site/js/ponymail-coffee.js
index c4bfe8a..f91d79d 100644
--- a/site/js/ponymail-coffee.js
+++ b/site/js/ponymail-coffee.js
@@ -959,7 +959,7 @@ pm_snap = null;
 /* dealWithKeyboard: Handles what happens when you hit the escape key */
 
 dealWithKeyboard = function(e) {
-  var dp, email, j, len, splash;
+  var dp, splash;
   splash = get('splash');
 
   /* escape key: hide composer/settings/thread */
@@ -982,9 +982,8 @@ dealWithKeyboard = function(e) {
         } else {
 
           /* Close all email ? */
-          for (j = 0, len = ponymail_email_open.length; j < len; j++) {
-            email = ponymail_email_open[j];
-            email.hide();
+          while (ponymail_email_open.length > 0) {
+            ponymail_email_open[0].hide();
           }
         }
       }


Mime
View raw message