Move Absing from the APIKudosuHistory

This commit is contained in:
Andrei Zavatski
2019-08-30 10:13:21 +03:00
parent b7a75ef5e1
commit b03b520818
2 changed files with 2 additions and 7 deletions

View File

@ -13,12 +13,6 @@ namespace osu.Game.Online.API.Requests.Responses
public DateTimeOffset CreatedAt; public DateTimeOffset CreatedAt;
[JsonProperty("amount")] [JsonProperty("amount")]
private int amount
{
//We can receive negative values. However "action" is enough to build needed items
set => Amount = Math.Abs(value);
}
public int Amount; public int Amount;
[JsonProperty("post")] [JsonProperty("post")]

View File

@ -9,6 +9,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
using System;
namespace osu.Game.Overlays.Profile.Sections.Kudosu namespace osu.Game.Overlays.Profile.Sections.Kudosu
{ {
@ -56,7 +57,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
if (!string.IsNullOrEmpty(prefix)) if (!string.IsNullOrEmpty(prefix))
{ {
linkFlowContainer.AddText(prefix); linkFlowContainer.AddText(prefix);
linkFlowContainer.AddText($@" {historyItem.Amount} kudosu", t => linkFlowContainer.AddText($@" {Math.Abs(historyItem.Amount)} kudosu", t =>
{ {
t.Font = t.Font.With(italics: true); t.Font = t.Font.With(italics: true);
t.Colour = colours.Blue; t.Colour = colours.Blue;