diff options
author | Mario <mario@mariovavti.com> | 2020-10-22 11:33:25 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-10-22 11:33:25 +0000 |
commit | 96de38a1f06193d674f8fe89cb1852e0e4abb4cf (patch) | |
tree | 8ae120d73a0e59c4e581d7b63b659ad106b1b672 /Zotlabs/Module/Network.php | |
parent | cef0c2ebb2b16b006eca7dce8ec0b1a95d916dba (diff) | |
download | volse-hubzilla-96de38a1f06193d674f8fe89cb1852e0e4abb4cf.tar.gz volse-hubzilla-96de38a1f06193d674f8fe89cb1852e0e4abb4cf.tar.bz2 volse-hubzilla-96de38a1f06193d674f8fe89cb1852e0e4abb4cf.zip |
adapt notifications and mark item seen handling to play well with client side page caching
Diffstat (limited to 'Zotlabs/Module/Network.php')
-rw-r--r-- | Zotlabs/Module/Network.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index df60fb9a3..bbacbb21e 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -493,7 +493,6 @@ class Network extends \Zotlabs\Web\Controller { $page_mode = 'client'; $parents_str = ''; - $update_unseen = ''; $simple_update = (($update) ? " and item_unseen = 1 " : ''); @@ -532,9 +531,6 @@ class Network extends \Zotlabs\Web\Controller { ); $parents_str = ids_to_querystr($items,'item_id'); - if($parents_str) { - $update_unseen = " AND id IN ( " . dbesc($parents_str) . " )"; - } require_once('include/items.php'); @@ -598,35 +594,6 @@ class Network extends \Zotlabs\Web\Controller { $items = array(); } - if($page_mode === 'list') { - - /** - * in "list mode", only mark the parent item and any like activities as "seen". - * We won't distinguish between comment likes and post likes. The important thing - * is that the number of unseen comments will be accurate. The SQL to separate the - * comment likes could also get somewhat hairy. - */ - - if($parents_str) { - $update_unseen = " AND ( id IN ( " . dbesc($parents_str) . " )"; - $update_unseen .= " OR ( parent IN ( " . dbesc($parents_str) . " ) AND verb in ( '" . dbesc(ACTIVITY_LIKE) . "','" . dbesc(ACTIVITY_DISLIKE) . "' ))) "; - } - } - else { - if($parents_str) { - $update_unseen = " AND parent IN ( " . dbesc($parents_str) . " )"; - } - } - } - - if($update_unseen) { - $x = [ 'channel_id' => local_channel(), 'update' => 'unset' ]; - call_hooks('update_unseen',$x); - if($x['update'] === 'unset' || intval($x['update'])) { - $r = q("UPDATE item SET item_unseen = 0 WHERE item_unseen = 1 AND uid = %d $update_unseen ", - intval(local_channel()) - ); - } } $mode = (($nouveau) ? 'network-new' : 'network'); |