diff --git a/include/conversation.php b/include/conversation.php index baf7633a77..6adc00d0c4 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -697,6 +697,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o '$live_update' => $live_update_div, '$remove' => DI::l10n()->t('remove'), '$mode' => $mode, + '$update' => $update, '$user' => $a->user, '$threads' => $threads, '$dropping' => ($page_dropping ? DI::l10n()->t('Delete Selected Items') : False), diff --git a/view/js/main.js b/view/js/main.js index b523ce6e70..2e665d1000 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -620,6 +620,10 @@ function liveUpdate(src) { in_progress = false; update_item = 0; + if ($('.wall-item-body', data).length == 0) { + return; + } + $('.wall-item-body', data).imagesLoaded(function() { updateConvItems(data); diff --git a/view/templates/conversation.tpl b/view/templates/conversation.tpl index 5a4ca2d634..761a31a842 100644 --- a/view/templates/conversation.tpl +++ b/view/templates/conversation.tpl @@ -1,6 +1,4 @@ - {{$live_update nofilter}} - {{foreach $threads as $thread}}
{{foreach $thread.items as $item}} @@ -18,7 +16,7 @@ {{/foreach}}
{{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -28,3 +26,4 @@
{{/if}} +{{/if}} diff --git a/view/templates/threaded_conversation.tpl b/view/templates/threaded_conversation.tpl index d993c6b33b..f4a47354ed 100644 --- a/view/templates/threaded_conversation.tpl +++ b/view/templates/threaded_conversation.tpl @@ -1,10 +1,8 @@ - {{$live_update nofilter}} - {{foreach $threads as $thread}} {{include file="{{$thread.template}}" item=$thread}} {{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -15,3 +13,4 @@
{{/if}} +{{/if}} diff --git a/view/theme/frio/templates/threaded_conversation.tpl b/view/theme/frio/templates/threaded_conversation.tpl index f618da2817..de5522fa9b 100644 --- a/view/theme/frio/templates/threaded_conversation.tpl +++ b/view/theme/frio/templates/threaded_conversation.tpl @@ -1,8 +1,6 @@ - +{{if !$update}}{{/if}} {{if $mode == display}}{{/if}} - {{$live_update nofilter}} - {{foreach $threads as $thread}}
@@ -15,7 +13,7 @@
{{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -24,3 +22,4 @@ {{/if}} +{{/if}} diff --git a/view/theme/quattro/templates/conversation.tpl b/view/theme/quattro/templates/conversation.tpl index ce89d579ea..7e7f8cea89 100644 --- a/view/theme/quattro/templates/conversation.tpl +++ b/view/theme/quattro/templates/conversation.tpl @@ -1,5 +1,4 @@ {{$live_update nofilter}} - {{foreach $threads as $thread}}
{{foreach $thread.items as $item}} @@ -23,7 +22,7 @@ {{/foreach}}
{{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -46,4 +45,4 @@ $('#item-'+id).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 2000); {{/if}} - +{{/if}} diff --git a/view/theme/quattro/templates/threaded_conversation.tpl b/view/theme/quattro/templates/threaded_conversation.tpl index 33431361f6..640ecbfd0d 100644 --- a/view/theme/quattro/templates/threaded_conversation.tpl +++ b/view/theme/quattro/templates/threaded_conversation.tpl @@ -1,5 +1,4 @@ {{$live_update nofilter}} - {{foreach $threads as $thread}}
@@ -13,7 +12,7 @@
{{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -37,4 +36,4 @@ $('#item-'+id).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 2000); {{/if}} - +{{/if}} diff --git a/view/theme/vier/templates/threaded_conversation.tpl b/view/theme/vier/templates/threaded_conversation.tpl index 35807f9912..de35497d24 100644 --- a/view/theme/vier/templates/threaded_conversation.tpl +++ b/view/theme/vier/templates/threaded_conversation.tpl @@ -1,5 +1,4 @@ {{$live_update nofilter}} - {{foreach $threads as $thread}}
@@ -13,7 +12,7 @@
{{/foreach}} - +{{if !$update}}
{{if $dropping}} @@ -37,4 +36,4 @@ $('#item-'+id).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 2000); {{/if}} - +{{/if}}