1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 23:17:18 +08:00

Fix back-to-front logic

This commit is contained in:
Bartłomiej Dach 2023-05-06 15:34:55 +02:00
parent 80ac8abaa6
commit 3942281d13
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -122,12 +122,12 @@ namespace osu.Game.Graphics.UserInterfaceV2
private void updateStatus()
{
submitButton.Enabled.Value = !string.IsNullOrWhiteSpace(commentsTextBox.Current.Value) || IsCommentRequired(reasonDropdown.Current.Value);
submitButton.Enabled.Value = !string.IsNullOrWhiteSpace(commentsTextBox.Current.Value) || !IsCommentRequired(reasonDropdown.Current.Value);
}
/// <summary>
/// Determines whether an additional comment is required for submitting the report with the supplied <paramref name="reason"/>.
/// </summary>
protected virtual bool IsCommentRequired(TReportReason reason) => false;
protected virtual bool IsCommentRequired(TReportReason reason) => true;
}
}

View File

@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Chat
Action = report;
}
protected override bool IsCommentRequired(ChatReportReason reason) => reason != ChatReportReason.Other;
protected override bool IsCommentRequired(ChatReportReason reason) => reason == ChatReportReason.Other;
private void report(ChatReportReason reason, string comments)
{