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:
parent
97bd76efc6
commit
254c881ded
@ -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, () =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user