Skip to content
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

Fix double binding causing game crash after API enters failing state #27754

Merged
merged 3 commits into from Mar 29, 2024

Conversation

Comment on lines 75 to 76
userStatus.BindTo(api.LocalUser.Value.Status);
userStatus.BindValueChanged(e => updateDropdownCurrent(e.NewValue), true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not correct though now is it?

api.LocalUser.Value.Status is a bindable field under a bindable. api.LocalUser will change value after e.g. a log-out and a log-in. Upon which userStatus will not be bound to api.LocalUser.Value.Status anymore, it will be bound to the old user's Status bindable.

There was a reason this was placed where it was placed.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Yep, you got that one correct. Pretty annoying usage of bindables here, will adjust.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 29, 2024
@bdach bdach merged commit 5c7fdec into ppy:master Mar 29, 2024
11 of 17 checks passed
@peppy peppy deleted the multi-binding-fix branch March 29, 2024 11:05
@Joehuu Joehuu mentioned this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants