FIX: Allow file-change events soon after reloading (#13065)

This patch remembers the last id for the `file-change` event and uses it
to initialize the client side watcher. This should help fix the issue
where styles are not reloaded client side if the browser refreshed.
This commit is contained in:
Robin Ward
2021-05-14 12:36:53 -04:00
committed by GitHub
parent d6b53b688d
commit 32d6d8308c
3 changed files with 36 additions and 26 deletions

View File

@ -539,6 +539,7 @@ module ApplicationHelper
if ENV['DEBUG_PRELOADED_APP_DATA']
setup_data[:debug_preloaded_app_data] = true
end
setup_data[:mb_last_file_change_id] = MessageBus.last_id('/file-change')
end
if guardian.can_enable_safe_mode? && params["safe_mode"]