Skip to content

Fix UI elements not synced when changing modes, #4985 #5039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

uiryuu
Copy link
Member

@uiryuu uiryuu commented Jul 1, 2024


Description:
This commit fixes 2 bugs when changing modes at paused state:

  • When changing to/from music mode while paused, the slider, time, volume icon, and play button is not correctly updated
  • When entering full screen while paused, the additional info view is not updated

This commit also added currentController which auto select the current window controller (mainWindow/miniPlayer). When syncing UI, only the controls in the current window is updated.

- Removed `SyncUIOption.muteButton`, use `.volume` instead
- Added a helper function to sync multiple UI options
- Added a function to setup all UI elements, called when switching
- Added `currentController`; when syncing UI, only update the UI in the
  current window
- Call `updateAdditionalInfo` when entering full screen
@uiryuu uiryuu changed the title Fix a UI elements not synced when changing modes Fix UI elements not synced when changing modes Jul 2, 2024
@uiryuu
Copy link
Member Author

uiryuu commented Jul 2, 2024

I think I also accidentally fixed #4985 in this PR

@uiryuu uiryuu linked an issue Jul 2, 2024 that may be closed by this pull request
1 task
@low-batt low-batt changed the title Fix UI elements not synced when changing modes Fix UI elements not synced when changing modes, #4985 Jul 2, 2024
Copy link
Contributor

@low-batt low-batt left a comment

Choose a reason for hiding this comment

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

Pulled PR, built IINA, confirmed fixes behavior, including #4985. Looks good to me.

@uiryuu uiryuu merged commit 0ca81f9 into develop Jul 3, 2024
@uiryuu uiryuu deleted the sync-ui-at-switching branch July 3, 2024 12:10
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.

OSD battery and time message displayed without information
2 participants