-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add BeatmapInfo.LastUpdate
to track the time of local changes
#19530
Conversation
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.
This'll need conflict resolution (looks to be trivial) - but while I'm at it...
osu.Game/Beatmaps/BeatmapInfo.cs
Outdated
/// <summary> | ||
/// The last time of a local modification (via the editor). | ||
/// </summary> | ||
public DateTimeOffset? LastUpdated { get; set; } | ||
|
||
/// <summary> | ||
/// The last time online metadata was applied to this beatmap. | ||
/// </summary> | ||
public DateTimeOffset? LastOnlineUpdate { 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.
I'm not sure how to feel about having both DateTimeOffset? BeatmapInfo.LastUpdated
(added here) and DateTimeOffset? BeatmapInfo.LastOnlineUpdate
(already present). Can we rename the former to something like LastLocalUpdate
or something for clarity?
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.
Looking back at this, I'm wondering if we can just have a single property to handle both? I can't think of a case where we'd use the online value if there are local modifications. And it would be reset to the correct value the next time an update is applied (restoring to a non-modified state).
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.
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.
Yeah, best to keep separate for now. We can complicate things later if required.
I'll rename to LastLocalUpdate
for now.
Also fix
DateAdded
not being set to a sane value when creating a new beatmap in the editor.Note that this date is not currently used, but I figure it will be useful for showing a user's own creations (which would default to "last modified" for sure).