DEV: Extract theme resolution to a helper (#27426)

This ensures that the theme id is resolved as early as possible in the
request cycle. This is necessary for the custom homepage to skip
preloading the wrong data.
This commit is contained in:
Penar Musaraj
2024-06-20 11:33:46 -04:00
committed by GitHub
parent d29160131d
commit 33de5abb6e
7 changed files with 51 additions and 35 deletions

View File

@ -560,7 +560,7 @@ module ApplicationHelper
end
def current_homepage
current_user&.user_option&.homepage || HomepageHelper.resolve(request, current_user)
current_user&.user_option&.homepage || HomepageHelper.resolve(theme_id, current_user)
end
def build_plugin_html(name)