Fixed issue #858 - activity stream or online notifications are sometimes empty.

This commit is contained in:
Martin Edenhofer 2017-03-19 00:40:45 +01:00
parent 21d575dbfd
commit 7eebbc6f17

View file

@ -622,9 +622,9 @@ class App.ActionRow extends App.Controller
do (item) => do (item) =>
@$('[data-type="' + item.name + '"]').on( @$('[data-type="' + item.name + '"]').on(
'click' 'click'
(e) => (e) ->
e.preventDefault() e.preventDefault()
item.callback(@el) item.callback()
) )
class App.Sidebar extends App.Controller class App.Sidebar extends App.Controller
@ -1085,6 +1085,9 @@ class App.CollectionController extends App.Controller
if itemCount > position if itemCount > position
position += 1 position += 1
element = @el.find(".js-item:nth-child(#{position})") element = @el.find(".js-item:nth-child(#{position})")
if !element.get(0)
@el.append(html)
return
if @insertPosition is 'before' if @insertPosition is 'before'
element.before(html) element.before(html)
else else