1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Also check null for bindable channel value

This commit is contained in:
Joseph Madamba 2023-01-17 14:12:48 -08:00
parent 97bd76efc6
commit 254c881ded

View File

@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Chat
private UserProfileOverlay? profileOverlay { get; set; } private UserProfileOverlay? profileOverlay { get; set; }
[Resolved] [Resolved]
private Bindable<Channel>? currentChannel { get; set; } private Bindable<Channel?>? currentChannel { get; set; }
private readonly APIUser user; private readonly APIUser user;
private readonly OsuSpriteText drawableText; private readonly OsuSpriteText drawableText;
@ -161,7 +161,7 @@ namespace osu.Game.Overlays.Chat
if (!user.Equals(api.LocalUser.Value)) if (!user.Equals(api.LocalUser.Value))
items.Add(new OsuMenuItem(UsersStrings.CardSendMessage, MenuItemType.Standard, openUserChannel)); items.Add(new OsuMenuItem(UsersStrings.CardSendMessage, MenuItemType.Standard, openUserChannel));
if (currentChannel != null) if (currentChannel?.Value != null)
{ {
items.Add(new OsuMenuItem(ChatStrings.MentionUser, MenuItemType.Standard, () => items.Add(new OsuMenuItem(ChatStrings.MentionUser, MenuItemType.Standard, () =>
{ {