mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Fix delete button being able to show on current item
This commit is contained in:
@ -78,9 +78,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match.Playlist
|
|||||||
|
|
||||||
private void updateDeleteButtonVisibility()
|
private void updateDeleteButtonVisibility()
|
||||||
{
|
{
|
||||||
|
if (multiplayerClient.Room == null)
|
||||||
|
return;
|
||||||
|
|
||||||
bool isItemOwner = Item.OwnerID == api.LocalUser.Value.OnlineID || multiplayerClient.IsHost;
|
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;
|
AllowEditing = isItemOwner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user