whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: fix month transition code
Date Sat, 01 Oct 2016 11:30:56 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  a1d93dd   fix month transition code
a1d93dd is described below

commit a1d93dd27686291446b882df3aea4664eca88e35
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sat Oct 1 07:30:29 2016 -0400

    fix month transition code
---
 www/secmail/views/index.js.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/secmail/views/index.js.rb b/www/secmail/views/index.js.rb
index f52207a..ecb8ead 100644
--- a/www/secmail/views/index.js.rb
+++ b/www/secmail/views/index.js.rb
@@ -78,9 +78,11 @@ class Index < React
   # on initial load, fetch latest mailbox, subscribe to keyboard and
   # server side events, and initialize selected item.
   def componentDidMount()
+    today = Date.new()
+    twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
     self.fetch_month() do
       # for the first week of the month, fetch previous month too
-      self.fetch_month() if Date.new().getDate() <= 7
+      self.fetch_month() if @nextmbox and twice
     end
 
     window.onkeydown = self.keydown

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message