Skip to content

Conversation

@gilles1986
Copy link
Collaborator

@gilles1986 gilles1986 commented Jan 7, 2026

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:

  • Added an emulator_settings_callback attribute to the SettingsPage class, which is called after emulator settings are saved to notify other components of the update. [1] [2]
  • Registered the Collection page's refresh_emulator_cache method as the callback in the layout setup, ensuring the Collection page updates its cached emulator path and UI when settings change.
  • Implemented the refresh_emulator_cache method in the Collection page to reload emulator configuration from disk, update the cached path, log the change, and refresh the table if initialized.
  • Removed redundant emulator path refresh logic from the _refresh_table method, as cache updates are now handled via the callback.
  • Updated the play icon logic in the Collection page to rely on the cached emulator path for improved performance.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a callback mechanism to refresh the collection page's cached emulator settings when they are changed in the settings page, ensuring that play icons immediately reflect the current emulator configuration.

Key Changes:

  • Added a callback registration system in SettingsPage to notify when emulator settings are saved
  • Implemented refresh_emulator_cache method in CollectionPage that reloads the ConfigManager and updates the table
  • Removed the per-refresh cache update from _refresh_table in favor of the explicit callback-based approach

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ui/pages/settings_page.py Added emulator_settings_callback property and invokes it after saving emulator settings with logging
ui/pages/collection_page.py Added refresh_emulator_cache method to reload config and refresh table; removed per-refresh cache updates
ui/layout.py Registered collection page's refresh method as the callback for settings changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

gilles1986 and others added 2 commits January 7, 2026 20:32
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Gilles Meyer <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Gilles Meyer <[email protected]>
@iamtheratio iamtheratio merged commit e2bd122 into main Jan 7, 2026
4 checks passed
@iamtheratio iamtheratio deleted the bugfix/Emulation-Path-Caching branch January 7, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants