You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/06 09:41:50 UTC

[1/2] incubator-ponymail git commit: mark emails as read when...read

Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake 3605a82b9 -> abac8d911


mark emails as read when...read


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

Branch: refs/heads/coffee-and-cake
Commit: a8cc75a30a761710f63cf28b133b439165085ebb
Parents: 3605a82
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 11:38:54 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 11:38:54 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/email_display_basic.coffee | 3 +++
 site/js/ponymail-coffee.js                | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/a8cc75a3/site/js/coffee/email_display_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/email_display_basic.coffee b/site/js/coffee/email_display_basic.coffee
index 3542dc5..708c373 100644
--- a/site/js/coffee/email_display_basic.coffee
+++ b/site/js/coffee/email_display_basic.coffee
@@ -82,6 +82,9 @@ class BasicEmailDisplay
         if not ponymail_stored_email[json.mid]
             ponymail_stored_email[json.mid] = json
             
+        ### Mark as read ###
+        markRead(json.mid)
+        
         placeholder = get('placeholder_' + @mid + "_" + json.mid) || get('placeholder_' + json.mid)
             
         ### Display email headers ###

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/a8cc75a3/site/js/ponymail-coffee.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail-coffee.js b/site/js/ponymail-coffee.js
index a522aa8..f9db991 100644
--- a/site/js/ponymail-coffee.js
+++ b/site/js/ponymail-coffee.js
@@ -665,6 +665,9 @@ BasicEmailDisplay = (function() {
     if (!ponymail_stored_email[json.mid]) {
       ponymail_stored_email[json.mid] = json;
     }
+
+    /* Mark as read */
+    markRead(json.mid);
     placeholder = get('placeholder_' + this.mid + "_" + json.mid) || get('placeholder_' + json.mid);
 
     /* Display email headers */


[2/2] incubator-ponymail git commit: only try to save data to localStorage, log if fail but don't crash

Posted by hu...@apache.org.
only try to save data to localStorage, log if fail but don't crash


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

Branch: refs/heads/coffee-and-cake
Commit: abac8d911ddcf0b03793f18f8b3623442bf98cbb
Parents: a8cc75a
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 11:40:53 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 11:40:53 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/localstorage.coffee | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/abac8d91/site/js/coffee/localstorage.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/localstorage.coffee b/site/js/coffee/localstorage.coffee
index 0fcf25e..add99ab 100644
--- a/site/js/coffee/localstorage.coffee
+++ b/site/js/coffee/localstorage.coffee
@@ -36,7 +36,12 @@ catch e
 dbWrite = (key, value) ->
     ### Can we use localStorage? ###
     if pm_storage_available
-        return window.localStorage.setItem(key, value)
+        try
+            rv = window.localStorage.setItem(key, value)
+            return rv
+        catch e
+            console.log("Could not save data to DB: " + e)
+            return null
     else
         ### Guess not, fall back to (ineffective) global var ###
         pm_storage_globvar[key] = value