Permalink
Browse files

Added Best sort to preference

  • Loading branch information...
QuantumBadger committed Jun 24, 2018
1 parent 1e0538f commit 8dd409f781c3613bd8b0f9b3f8f32fe0aa180db3
@@ -51,7 +51,16 @@ public PostListingController(PostListingURL url, final Context context) {
if(url.pathType() == RedditURLParser.SUBREDDIT_POST_LISTING_URL) {
if(url.asSubredditPostListURL().order == null) {
url = url.asSubredditPostListURL().sort(defaultOrder(context));
PostSort order = defaultOrder(context);
if(order == PostSort.BEST
&& url.asSubredditPostListURL().type != SubredditPostListURL.Type.FRONTPAGE) {
order = PostSort.HOT;
}
url = url.asSubredditPostListURL().sort(order);
}
} else if(url.pathType() == RedditURLParser.USER_POST_LISTING_URL) {
if(url.asUserPostListURL().order == null) {
@@ -101,6 +101,7 @@
<item>@string/sort_posts_new</item>
<item>@string/sort_posts_rising</item>
<item>@string/sort_posts_controversial</item>
<item>@string/sort_posts_best</item>
<item>@string/sort_posts_top_hour</item>
<item>@string/sort_posts_top_today</item>
<item>@string/sort_posts_top_week</item>
@@ -115,6 +116,7 @@
<item>new</item>
<item>rising</item>
<item>controversial</item>
<item>best</item>
<item>top_hour</item>
<item>top_day</item>
<item>top_week</item>

0 comments on commit 8dd409f

Please sign in to comment.