From 5ece50c39a37c3b1dec7aa81f4be867b33e61d6a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 5 Sep 2015 11:01:38 +0200 Subject: [PATCH] Set online notifications always to seen on controller show(). --- .../javascripts/app/controllers/ticket_zoom.js.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 9568e9d2b..124d3c12a 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -89,6 +89,11 @@ class App.TicketZoom extends App.Controller show: (params) => + @navupdate '#' + + # set all notifications to seen + App.OnlineNotification.seen( 'Ticket', @ticket_id ) + # if controller is executed twice, go to latest article if @activeState @scrollToBottom() @@ -103,8 +108,6 @@ class App.TicketZoom extends App.Controller @highlighed = true @highligher.loadHighlights() - App.OnlineNotification.seen( 'Ticket', @ticket_id ) - @navupdate '#' @positionPageHeaderStart() hide: =>