mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Add a preference for trending on the front page
This commit is contained in:
@@ -345,6 +345,9 @@ class HotController(ListingWithPromos):
|
||||
|
||||
@classmethod
|
||||
def trending_info(cls):
|
||||
if not c.user.pref_show_trending:
|
||||
return None
|
||||
|
||||
trending_data = trending.get_trending_subreddits()
|
||||
|
||||
if not trending_data:
|
||||
|
||||
@@ -66,6 +66,7 @@ PREFS_VALIDATORS = dict(
|
||||
pref_show_adbox=VBoolean("show_adbox"),
|
||||
pref_show_sponsors=VBoolean("show_sponsors"),
|
||||
pref_show_sponsorships=VBoolean("show_sponsorships"),
|
||||
pref_show_trending=VBoolean("show_trending"),
|
||||
pref_highlight_new_comments=VBoolean("highlight_new_comments"),
|
||||
pref_monitor_mentions=VBoolean("monitor_mentions"),
|
||||
)
|
||||
|
||||
@@ -93,6 +93,7 @@ class Account(Thing):
|
||||
pref_show_adbox = True,
|
||||
pref_show_sponsors = True, # sponsored links
|
||||
pref_show_sponsorships = True,
|
||||
pref_show_trending=True,
|
||||
pref_highlight_new_comments = True,
|
||||
pref_monitor_mentions=True,
|
||||
pref_collapse_left_bar=False,
|
||||
|
||||
@@ -144,6 +144,14 @@
|
||||
<p>${checkbox(_("show me new links on the front page"), "organic")}</p>
|
||||
%endif
|
||||
|
||||
<p>
|
||||
${checkbox(_("show trending subreddits on the front page"), "show_trending")}
|
||||
 
|
||||
<span class="little gray">
|
||||
${_("(a list of popular and notable subreddits to check out)")}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>${checkbox(_("show me links I've recently viewed"), "clickgadget")}</p>
|
||||
<p>${checkbox(_("compress the link display"), "compress")}</p>
|
||||
<p>${checkbox(_("show additional details in the domain text when available"), "domain_details")}
|
||||
|
||||
Reference in New Issue
Block a user