Fix delete button being able to show on current item

This commit is contained in:
Dan Balasescu 2021-12-21 16:57:56 +09:00
parent 32fbaf47c0
commit 51b7e920c0

View File

@ -78,9 +78,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match.Playlist
private void updateDeleteButtonVisibility()
{
if (multiplayerClient.Room == null)
return;
bool isItemOwner = Item.OwnerID == api.LocalUser.Value.OnlineID || multiplayerClient.IsHost;
AllowDeletion = isItemOwner && SelectedItem.Value != Item;
AllowDeletion = isItemOwner && Item.ID != multiplayerClient.Room.Settings.PlaylistItemId;
AllowEditing = isItemOwner;
}
}