1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

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;
[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;
[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;
using osu.Game.Online.Chat;
using System;
namespace osu.Game.Overlays.Profile.Sections.Kudosu
{
@ -56,7 +57,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
if (!string.IsNullOrEmpty(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.Colour = colours.Blue;