Fix incorrect usage of nullable in ControlItemMention

This commit is contained in:
Dean Herbert 2022-03-18 13:59:03 +09:00
parent d1fd14e287
commit 5d940ded09

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Chat.ChannelControl
{
public readonly BindableInt Mentions = new BindableInt();
private OsuSpriteText? countText;
private OsuSpriteText countText = null!;
[BackgroundDependencyLoader]
private void load(OsuColour osuColour, OverlayColourProvider colourProvider)
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.Chat.ChannelControl
{
int mentionCount = change.NewValue;
countText!.Text = mentionCount > 99 ? "99+" : mentionCount.ToString();
countText.Text = mentionCount > 99 ? "99+" : mentionCount.ToString();
if (mentionCount > 0)
Show();