-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed User Ruleset from Leaderboard #31720
base: master
Are you sure you want to change the base?
Conversation
… change request Co-authored-by: Agatem <[email protected]>
…s review change request" This reverts commit 82c9704.
…'s review change request" This reverts commit b0ce6b6.
Alright, I made the changes, but now there is a dependency issue in , and I have no idea how to fix this issue. |
Co-authored-by: Bartłomiej Dach <[email protected]>
canBeNull = true did not work.
Formatting error might be because of the preprocessor directive being inside the class.
Trying to figure out a way to have the nullable OsuGame reference where the other references are explicitly un-nullable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash and force-push all of the extra commits out of here, it's noise in history that doesn't need to be there.
Upon closer inspection this should probably also be applied to clickable avatars on the results screen:
which is going to be a bit annoying to achieve and also makes me unsure about whether this change is worth it in general.
// using nullable enable here because canBeNull is not respected for OsuGame | ||
#nullable enable | ||
|
||
[Resolved] | ||
private OsuGame? game { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not how this should be done. Old classes where NRT is still not on are a bit of an edge case.
diff --git a/osu.Game/Online/Leaderboards/LeaderboardScore.cs b/osu.Game/Online/Leaderboards/LeaderboardScore.cs
index 2f8e7bb7b9..438a0e2268 100644
--- a/osu.Game/Online/Leaderboards/LeaderboardScore.cs
+++ b/osu.Game/Online/Leaderboards/LeaderboardScore.cs
@@ -6,6 +6,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@@ -87,11 +88,9 @@ public partial class LeaderboardScore : OsuClickableContainer, IHasContextMenu,
[Resolved]
private ScoreManager scoreManager { get; set; } = null!;
- // using nullable enable here because canBeNull is not respected for OsuGame
-#nullable enable
-
- [Resolved]
- private OsuGame? game { get; set; }
+ [Resolved(CanBeNull = true)]
+ [CanBeNull]
+ private OsuGame game { get; set; }
public LeaderboardScore(ScoreInfo score, int? rank, bool isOnlineScope = true, bool highlightFriend = true)
{
Made a user profile open to the desired ruleset from a beatmap rather than the profile ruleset at all times.
Resolves #31628