Skip to content

Commit

Permalink
Update plugin.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
nbianca authored Nov 9, 2023
1 parent c642a18 commit 93c6add
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ module ::DiscourseAssign

on(:unassign_topic) { |topic, unassigning_user| Assigner.new(topic, unassigning_user).unassign }

Site.preloaded_category_custom_fields << "enable_unassigned_filter"
if self.respond_to?(:register_category_list_preloaded_category_custom_fields)
register_category_list_preloaded_category_custom_fields("enable_unassigned_filter")
if respond_to?(:register_preloaded_category_custom_fields)
register_preloaded_category_custom_fields("enable_unassigned_filter")
else
# TODO: Drop the if-statement and this if-branch in Discourse v3.2
Site.preloaded_category_custom_fields << "enable_unassigned_filter"
end

BookmarkQuery.on_preload do |bookmarks, bookmark_query|
Expand Down

0 comments on commit 93c6add

Please sign in to comment.