From: Michael Date: Wed, 20 Sep 2023 06:36:47 +0000 (+0000) Subject: Avoid jumps in the timeline after "received" has been selected X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a862c4255b7ebfb224a29345ea4f61272c118957;p=friendica.git Avoid jumps in the timeline after "received" has been selected --- diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 21ead331f0..beb3a72f3e 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -348,14 +348,16 @@ class Network extends Timeline $this->order = 'commented'; } + $this->selectedTab = $this->selectedTab ?? $this->order; + // Upon updates in the background and order by last comment we order by received date, // since otherwise the feed will optically jump, when some already visible thread has been updated. if ($this->update && ($this->selectedTab == TimelineEntity::COMMENTED)) { $this->order = 'received'; + $request['last_received'] = $request['last_commented'] ?? null; + $request['first_received'] = $request['first_commented'] ?? null; } - $this->selectedTab = $this->selectedTab ?? $this->order; - // Prohibit combined usage of "star" and "mention" if ($this->selectedTab == TimelineEntity::STAR) { $this->mention = false;