mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 01:15:26 +08:00
FEATURE: allow user to set preferred sidebar list destination (#18594)
User can choose between latest or new/unread and that preference will affect behavior of sidebar links.
This commit is contained in:

committed by
GitHub

parent
daa8aedccf
commit
243efa8931
@ -34,7 +34,8 @@ class UserOptionSerializer < ApplicationSerializer
|
||||
:timezone,
|
||||
:skip_new_user_tips,
|
||||
:default_calendar,
|
||||
:oldest_search_log_date
|
||||
:oldest_search_log_date,
|
||||
:sidebar_list_destination
|
||||
|
||||
def auto_track_topics_after_msecs
|
||||
object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
|
||||
@ -51,4 +52,8 @@ class UserOptionSerializer < ApplicationSerializer
|
||||
def theme_ids
|
||||
object.theme_ids.presence || [SiteSetting.default_theme_id]
|
||||
end
|
||||
|
||||
def sidebar_list_destination
|
||||
object.sidebar_list_none_selected? ? SiteSetting.default_sidebar_list_destination : object.sidebar_list_destination
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user