experimentally tweak adaptive mode to show unread articles first and other stuff later
This commit is contained in:
parent
c1f6e5f865
commit
398eaeb419
|
@ -2236,13 +2236,21 @@
|
||||||
if ($search) {
|
if ($search) {
|
||||||
$view_query_part = " ";
|
$view_query_part = " ";
|
||||||
} else if ($feed != -1) {
|
} else if ($feed != -1) {
|
||||||
$unread = getFeedUnread($link, $feed, $cat_view);
|
|
||||||
|
|
||||||
if ($cat_view && $feed > 0 && $include_children)
|
if (get_pref($link, "SORT_HEADLINES_BY_FEED_DATE", $owner_uid)) {
|
||||||
$unread += getCategoryChildrenUnread($link, $feed);
|
$a_date_sort_field = "updated";
|
||||||
|
} else {
|
||||||
|
$a_date_sort_field = "date_entered";
|
||||||
|
}
|
||||||
|
|
||||||
if ($unread > 0) {
|
if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
|
||||||
$view_query_part = " unread = true AND ";
|
$a_order_by = "$a_date_sort_field";
|
||||||
|
} else {
|
||||||
|
$a_order_by = "$a_date_sort_field DESC";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$override_order) {
|
||||||
|
$override_order = "unread DESC, $a_order_by";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue