mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Fix playlist settings reference leak due to unsafe callback binding
This commit is contained in:
parent
01cc9bd7ef
commit
c851e3d8f3
@ -78,6 +78,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
|
private IBindable<APIUser> localUser;
|
||||||
|
|
||||||
private readonly Room room;
|
private readonly Room room;
|
||||||
|
|
||||||
public MatchSettings(Room room)
|
public MatchSettings(Room room)
|
||||||
@ -304,7 +306,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
MaxAttempts.BindValueChanged(count => MaxAttemptsField.Text = count.NewValue?.ToString(), true);
|
MaxAttempts.BindValueChanged(count => MaxAttemptsField.Text = count.NewValue?.ToString(), true);
|
||||||
Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue ?? TimeSpan.FromMinutes(30), true);
|
Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue ?? TimeSpan.FromMinutes(30), true);
|
||||||
|
|
||||||
api.LocalUser.BindValueChanged(populateDurations, true);
|
localUser = api.LocalUser.GetBoundCopy();
|
||||||
|
localUser.BindValueChanged(populateDurations, true);
|
||||||
|
|
||||||
playlist.Items.BindTo(Playlist);
|
playlist.Items.BindTo(Playlist);
|
||||||
Playlist.BindCollectionChanged(onPlaylistChanged, true);
|
Playlist.BindCollectionChanged(onPlaylistChanged, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user