fix: Add emulator settings callback to refresh collection cache on ch… #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request improves how emulator settings changes are handled and propagated between the Settings and Collection pages. The main enhancement is the introduction of a callback mechanism that ensures the Collection page's emulator configuration is refreshed immediately after changes are made in the Settings page, resulting in more accurate UI feedback and better performance.
Emulator settings synchronization and cache refresh:
emulator_settings_callbackattribute to theSettingsPageclass, which is called after emulator settings are saved to notify other components of the update. [1] [2]refresh_emulator_cachemethod as the callback in the layout setup, ensuring the Collection page updates its cached emulator path and UI when settings change.refresh_emulator_cachemethod in the Collection page to reload emulator configuration from disk, update the cached path, log the change, and refresh the table if initialized._refresh_tablemethod, as cache updates are now handled via the callback.