$this->order = 'commented';
}
- // Upon force (updates in the background) and order by last comment we order by receive date,
+ // Upon updates in the background and order by last comment we order by receive date,
// since otherwise the feed will optically jump, when some already visible thread has been updated.
- if ($this->force && ($this->selectedTab == TimelineEntity::COMMENTED) && !empty($request['first_commented'])) {
+ if ($this->update && ($this->selectedTab == TimelineEntity::COMMENTED)) {
$this->order = 'received';
}
protected $noSharer;
/** @var bool */
protected $force;
+ /** @var bool */
+ protected $update;
/** @var App\Mode $mode */
protected $mode;
$this->maxId = $request['max_id'] ?? null;
$this->noSharer = !empty($request['no_sharer']);
- $this->force = !empty($request['force']);
+ $this->force = !empty($request['force']) && !empty($request['item']);
+ $this->update = !empty($request['force']) && !empty($request['first_received']) && !empty($request['first_created']) && !empty($request['first_uriid']) && !empty($request['first_commented']);
}
protected function getNoSharerWidget(string $base): string
$this->parseRequest($request);
$o = '';
- if ($this->force) {
+ if ($this->update || $this->force) {
if ($this->timeline->isChannel($this->selectedTab)) {
$items = $this->getChannelItems();
} else {
$this->parseRequest($request);
$o = '';
- if ($this->force) {
+ if ($this->update || $this->force) {
$o = DI::conversation()->render($this->getCommunityItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
}
$o = '';
- if (!$this->force) {
+ if (!$this->update && !$this->force) {
System::htmlUpdateExit($o);
}