Merge pull request #9679 from annando/issue-9457

Issue 9457: Fix remembering "personal" and "starred"
This commit is contained in:
Hypolite Petovan 2020-12-19 13:06:11 -05:00 committed by GitHub
commit 12e1be30aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,10 +289,16 @@ class Network extends BaseModule
if (!empty($get['star'])) {
self::$selectedTab = 'star';
self::$star = true;
} else {
self::$star = self::$selectedTab == 'star';
}
if (!empty($get['mention'])) {
self::$selectedTab = 'mention';
self::$mention = true;
} else {
self::$mention = self::$selectedTab == 'mention';
}
if (!empty($get['order'])) {
@ -302,9 +308,6 @@ class Network extends BaseModule
self::$order = 'received';
}
self::$star = intval($get['star'] ?? 0);
self::$mention = intval($get['mention'] ?? 0);
self::$selectedTab = self::$selectedTab ?? self::$order;
Session::set('network-tab', self::$selectedTab);