mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Simple implementation
This commit is contained in:
parent
38d39be678
commit
de8ac9a428
@ -66,6 +66,11 @@ namespace osu.Game.Beatmaps
|
||||
/// </summary>
|
||||
public int FavouriteCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this beatmap set has been favourited by the current user.
|
||||
/// </summary>
|
||||
public bool HasFavourited { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The availability of this beatmap set.
|
||||
/// </summary>
|
||||
|
@ -30,6 +30,9 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"preview_url")]
|
||||
private string preview { get; set; }
|
||||
|
||||
[JsonProperty(@"has_favourited")]
|
||||
private bool hasFavourited { get; set; }
|
||||
|
||||
[JsonProperty(@"play_count")]
|
||||
private int playCount { get; set; }
|
||||
|
||||
@ -91,6 +94,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
Ranked = ranked,
|
||||
LastUpdated = lastUpdated,
|
||||
Availability = availability,
|
||||
HasFavourited = hasFavourited,
|
||||
},
|
||||
Beatmaps = beatmaps?.Select(b => b.ToBeatmap(rulesets)).ToList(),
|
||||
};
|
||||
|
@ -246,6 +246,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
onlineStatusPill.Status = setInfo.NewValue.OnlineInfo.Status;
|
||||
|
||||
downloadButtonsContainer.FadeIn(transition_duration);
|
||||
|
||||
favouriteButton.Favourited.Value = setInfo.NewValue.OnlineInfo.HasFavourited;
|
||||
favouriteButton.FadeIn(transition_duration);
|
||||
|
||||
updateDownloadButtons();
|
||||
|
Loading…
Reference in New Issue
Block a user