]> git.mxchange.org Git - friendica.git/commitdiff
Order starred posts and posts with mention by the last comment date
authorMichael <heluecht@pirati.ca>
Thu, 21 Apr 2022 05:52:08 +0000 (05:52 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 21 Apr 2022 05:52:08 +0000 (05:52 +0000)
src/Module/Conversation/Network.php

index ca29f4341a1a0bb7a9a49974665e45fedd914b49..3e64eed5cfb35a7bb316cb104fcfe5af7f059a21 100644 (file)
@@ -309,8 +309,6 @@ class Network extends BaseModule
 
                self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
 
-               self::$order = 'commented';
-
                if (!empty($get['star'])) {
                        self::$selectedTab = 'star';
                        self::$star = true;
@@ -330,10 +328,12 @@ class Network extends BaseModule
                        self::$order = $get['order'];
                        self::$star = false;
                        self::$mention = false;
-               } elseif (in_array(self::$selectedTab, ['received', 'star', 'mention'])) {
+               } elseif (self::$selectedTab == 'received') {
                        self::$order = 'received';
-               } elseif (in_array(self::$selectedTab, ['created'])) {
+               } elseif (self::$selectedTab == 'created') {
                        self::$order = 'created';
+               } else {
+                       self::$order = 'commented';
                }
 
                self::$selectedTab = self::$selectedTab ?? self::$order;