aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Hq.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-18 09:52:44 +0000
committerMario <mario@mariovavti.com>2020-11-18 09:52:44 +0000
commitf2fd12fbe544d5e87680aed98489698b4ca9ddd6 (patch)
tree72ab0d93538739f20cf68d6d3e60f97245c80084 /Zotlabs/Module/Hq.php
parentb5ab77908e357b027a9298e0258f3c0737f3c721 (diff)
downloadvolse-hubzilla-f2fd12fbe544d5e87680aed98489698b4ca9ddd6.tar.gz
volse-hubzilla-f2fd12fbe544d5e87680aed98489698b4ca9ddd6.tar.bz2
volse-hubzilla-f2fd12fbe544d5e87680aed98489698b4ca9ddd6.zip
Do away with auto updates except for our own actions. We might consider to re-implement this for single thread view like eg /display. Instead of calculating scroll positions during updates, keep track of expanded items and set the expanded state when updating - this fixes issue #1488
Diffstat (limited to 'Zotlabs/Module/Hq.php')
-rw-r--r--Zotlabs/Module/Hq.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index e2678c07f..3f5c4ed52 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -38,9 +38,6 @@ class Hq extends \Zotlabs\Web\Controller {
if(!local_channel())
return;
- if($load)
- $_SESSION['loadtime'] = datetime_convert();
-
if(argc() > 1 && argv(1) !== 'load') {
$item_hash = argv(1);
}
@@ -87,15 +84,9 @@ class Hq extends \Zotlabs\Web\Controller {
goaway(z_root() . '/moderate/' . $target_item['id']);
}
- $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
-
- $simple_update = (($update) ? " AND item_unseen = 1 " : '');
-
+ $simple_update = '';
if($update && $_SESSION['loadtime'])
- $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
-
- if($static && $simple_update)
- $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
+ $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) AND author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
$sys = get_sys_channel();
$sql_extra = item_permissions_sql($sys['channel_id']);
@@ -148,8 +139,6 @@ class Hq extends \Zotlabs\Web\Controller {
nav_set_selected('HQ');
- $static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
-
if($target_item) {
// if the target item is not a post (eg a like) we want to address its thread parent
//$mid = ((($target_item['verb'] == ACTIVITY_LIKE) || ($target_item['verb'] == ACTIVITY_DISLIKE)) ? $target_item['thr_parent'] : $target_item['mid']);
@@ -182,8 +171,7 @@ class Hq extends \Zotlabs\Web\Controller {
'$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
- '$static' => $static,
- '$page' => 1,
+ '$page' => '1',
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$search' => '',
'$xchan' => '',
@@ -249,8 +237,6 @@ class Hq extends \Zotlabs\Web\Controller {
intval($sys['channel_id'])
);
}
-
- $_SESSION['loadtime'] = datetime_convert();
}
else {
$r = [];
@@ -275,6 +261,8 @@ class Hq extends \Zotlabs\Web\Controller {
$o .= '<div id="content-complete"></div>';
+ $_SESSION['loadtime'] = datetime_convert();
+
return $o;
}