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