Skip to content

Commit

Permalink
corrects exception as method does not access viewstate
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Sep 29, 2017
1 parent c7b9405 commit cfa419f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/views/notifications.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = (models) ->

if msg.chat_message?
return unless msg.chat_message?.message_content?
text = textMessage msg.chat_message.message_content, proxied
text = textMessage msg.chat_message.message_content, proxied, viewstate.showMessageInNotification
else if msg.hangout_event?.event_type == 'START_HANGOUT'
text = i18n.__ "call.incoming:Incoming call"
callNeedAnswer[conv_id] = true
Expand Down Expand Up @@ -105,9 +105,9 @@ module.exports = (models) ->
mainWindow = remote.getCurrentWindow()
mainWindow.flashFrame(true)

textMessage = (cont, proxied) ->
textMessage = (cont, proxied, showMessage = true) ->
if cont?.segment?
unless viewstate.showMessageInNotification
unless showMessage
i18n.__('conversation.new_message:New message received')
else
segs = for seg, i in cont?.segment ? []
Expand Down

0 comments on commit cfa419f

Please sign in to comment.