mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-18 18:54:34 +08:00
Moves the `experimental_new_new_view_groups` setting to an upcoming change called "Enable unified new" (`enable_unified_new`) This will aim to introduce the unified new view topic list to all sites as the permanent default experience.
15 lines
446 B
Ruby
Vendored
15 lines
446 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module TopMenu
|
|
def self.choices
|
|
base = %w[latest new unseen top categories read posted bookmarks hot]
|
|
begin
|
|
base << "unread" unless UpcomingChanges.enabled?(:enable_unified_new)
|
|
rescue ArgumentError
|
|
# During initial settings load, the enable_unified_new setting may not
|
|
# be registered yet. Default to including unread in that case.
|
|
base << "unread"
|
|
end
|
|
base
|
|
end
|
|
end
|