Merge pull request #11430 from annando/network-order
Order starred posts and posts with mention by the last comment date
This commit is contained in:
commit
45c4af3832
1 changed files with 4 additions and 4 deletions
|
@ -309,8 +309,6 @@ class Network extends BaseModule
|
||||||
|
|
||||||
self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
|
self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
|
||||||
|
|
||||||
self::$order = 'commented';
|
|
||||||
|
|
||||||
if (!empty($get['star'])) {
|
if (!empty($get['star'])) {
|
||||||
self::$selectedTab = 'star';
|
self::$selectedTab = 'star';
|
||||||
self::$star = true;
|
self::$star = true;
|
||||||
|
@ -330,10 +328,12 @@ class Network extends BaseModule
|
||||||
self::$order = $get['order'];
|
self::$order = $get['order'];
|
||||||
self::$star = false;
|
self::$star = false;
|
||||||
self::$mention = false;
|
self::$mention = false;
|
||||||
} elseif (in_array(self::$selectedTab, ['received', 'star', 'mention'])) {
|
} elseif (in_array(self::$selectedTab, ['received', 'star'])) {
|
||||||
self::$order = 'received';
|
self::$order = 'received';
|
||||||
} elseif (in_array(self::$selectedTab, ['created'])) {
|
} elseif (self::$selectedTab == 'created') {
|
||||||
self::$order = 'created';
|
self::$order = 'created';
|
||||||
|
} else {
|
||||||
|
self::$order = 'commented';
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$selectedTab = self::$selectedTab ?? self::$order;
|
self::$selectedTab = self::$selectedTab ?? self::$order;
|
||||||
|
|
Loading…
Reference in a new issue