aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Display.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/Display.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/Display.php')
-rw-r--r--Zotlabs/Module/Display.php25
1 files changed, 5 insertions, 20 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 3d61d7018..5d3ea94ff 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -22,9 +22,6 @@ class Display extends \Zotlabs\Web\Controller {
$module_format = 'html';
}
- if($load)
- $_SESSION['loadtime'] = datetime_convert();
-
if(observer_prohibited()) {
notice( t('Public access denied.') . EOL);
return;
@@ -183,22 +180,11 @@ class Display extends \Zotlabs\Web\Controller {
return '';
}
-
- $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($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)) {
+ $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()) . "' ";
- $static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
+ if((! $update) && (! $load)) {
// if the target item is not a post (eg a like) we want to address its thread parent
@@ -229,7 +215,6 @@ class Display extends \Zotlabs\Web\Controller {
'$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
- '$static' => $static,
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$search' => '',
@@ -315,7 +300,6 @@ class Display extends \Zotlabs\Web\Controller {
dbesc($target_item['parent_mid'])
);
}
-
if($r === null) {
// in case somebody turned off public access to sys channel content using permissions
// make that content unsearchable by ensuring the owner_xchan can't match
@@ -335,7 +319,6 @@ class Display extends \Zotlabs\Web\Controller {
intval($sysid)
);
}
- $_SESSION['loadtime'] = datetime_convert();
}
else {
@@ -448,6 +431,8 @@ class Display extends \Zotlabs\Web\Controller {
}
+ $_SESSION['loadtime'] = datetime_convert();
+
return $o;
}