You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/05/09 10:50:17 UTC

[whimsy] branch master updated: Is there a merge clash?

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f3930c  Is there a merge clash?
6f3930c is described below

commit 6f3930c0b5c59c56c86f23f622707af19af93c5d
Author: Sebb <se...@apache.org>
AuthorDate: Thu May 9 11:50:08 2019 +0100

    Is there a merge clash?
---
 www/secretary/workbench/views/index.js.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/www/secretary/workbench/views/index.js.rb b/www/secretary/workbench/views/index.js.rb
index 454d09a..cfeda33 100644
--- a/www/secretary/workbench/views/index.js.rb
+++ b/www/secretary/workbench/views/index.js.rb
@@ -82,7 +82,7 @@ class Index < Vue
     else
       log 'beforeMount - nomessages'
     end
-    self.merge(@@messages) if @@messages
+    self.mergemsgs @@messages if @@messages
   end
 
   # on initial load, fetch latest mailbox, subscribe to keyboard and
@@ -108,7 +108,7 @@ class Index < Vue
     events = EventSource.new('events')
     events.addEventListener :message do |event|
       messages = JSON.parse(event.data).messages
-      self.merge messages if messages
+      self.mergemsgs messages if messages
     end
 
     # close connection on exit
@@ -145,7 +145,7 @@ class Index < Vue
       @nextmbox = response.mbox
 
       # add messages to list
-      self.merge response.messages
+      self.mergemsgs response.messages
 
       # select oldest message
       self.selectRow Status.selected || @messages.last unless @selected
@@ -158,9 +158,9 @@ class Index < Vue
     }
   end
 
-  # merge new messages into the list
-  def merge(messages)
-    log "merge #{messages.length}"
+  # mergemsgs new messages into the list
+  def mergemsgs(messages)
+    log "mergemsgs #{messages.length}"
     messages.each do |new_message|
       index = @messages.find_index do |old_message| 
         old_message.time < new_message.time or
@@ -232,7 +232,7 @@ class Index < Vue
     log "refresh #{@@mbox}"
     @checking = true
     HTTP.post("actions/check-mail", mbox: @@mbox).then {|response|
-      self.merge response.messages
+      self.mergemsgs response.messages
       @checking = false
     }.catch {|error|
       alert error