From f91031bd657f6c7bb25d93fc2c69a84846ee9f03 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 Nov 2016 15:48:29 -0700 Subject: allow your own likes/comments to be updated when in static update mode --- Zotlabs/Module/Channel.php | 8 +++++++- Zotlabs/Module/Display.php | 8 ++++++-- Zotlabs/Module/Network.php | 11 +++++++++-- Zotlabs/Module/Pubstream.php | 10 ++++++++-- Zotlabs/Module/Search.php | 6 +++++- doc/dav_konqueror.bb | 2 +- view/js/main.js | 12 ++++++------ view/tpl/build_query.tpl | 1 + 8 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index e8bc53b5e..41b396c5c 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -74,6 +74,7 @@ class Channel extends \Zotlabs\Web\Controller { $category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : ''); $hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : ''); + $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); $groups = array(); @@ -110,6 +111,8 @@ class Channel extends \Zotlabs\Web\Controller { if(! $update) { + $static = intval(feature_enabled(\App::$profile['profile_uid'],'static_updates')); + $o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']); $o .= common_friends_visitor_widget(\App::$profile['profile_uid']); @@ -176,6 +179,9 @@ class Channel extends \Zotlabs\Web\Controller { if($load) $simple_update = ''; + if($static && $simple_update) + $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' "; + if(($update) && (! $load)) { if($mid) { @@ -304,7 +310,7 @@ class Channel extends \Zotlabs\Web\Controller { '$nouveau' => '0', '$wall' => '1', '$fh' => '0', - '$static' => intval(feature_enabled(\App::$profile['profile_uid'],'static_updates')), + '$static' => $static, '$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1), '$search' => '', '$order' => '', diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index 42bb6fe14..25153839c 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -121,6 +121,8 @@ class Display extends \Zotlabs\Web\Controller { return ''; } } + + $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); $simple_update = (($update) ? " AND item_unseen = 1 " : ''); @@ -130,11 +132,13 @@ class Display extends \Zotlabs\Web\Controller { if($load) $simple_update = ''; - $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0); - + if($static && $simple_update) + $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' "; if((! $update) && (! $load)) { + + $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0); $o .= '
' . "\r\n"; $o .= "