Inline everything in RecentActivityIcon

This commit is contained in:
LukynkaCZE
2022-08-06 07:16:34 +02:00
parent bd27995c71
commit 3000d9b9c6
5 changed files with 99 additions and 279 deletions

View File

@ -16,8 +16,6 @@ using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Chat;
using osu.Game.Online.Leaderboards;
using osu.Game.Rulesets;
using static osu.Game.Overlays.Profile.Sections.Recent.BeatmapIcon;
using static osu.Game.Overlays.Profile.Sections.Recent.SupporterIcon;
namespace osu.Game.Overlays.Profile.Sections.Recent
{
@ -121,107 +119,14 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
Height = 18
};
case RecentActivityType.UserSupportAgain:
return new SupporterIcon(SupporterType.SupportAgain)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.UserSupportFirst:
return new SupporterIcon(SupporterType.SupportFirst)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.UserSupportGift:
return new SupporterIcon(SupporterType.SupportGift)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapsetUpload:
return new BeatmapIcon(BeatmapActionType.Submitted)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapsetUpdate:
return new BeatmapIcon(BeatmapActionType.Updated)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapsetRevive:
return new BeatmapIcon(BeatmapActionType.Revived)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapsetDelete:
return new BeatmapIcon(BeatmapActionType.Deleted)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapsetApprove:
return new BeatmapIcon(BeatmapActionType.Qualified)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.BeatmapPlaycount:
return new BeatmapIcon(BeatmapActionType.PlayedTimes)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.RankLost:
return new OtherIcon(FontAwesome.Solid.AngleDoubleDown)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
case RecentActivityType.UsernameChange:
return new OtherIcon(FontAwesome.Solid.Tag)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
default:
return Empty();
return new RecentActivityIcon(activity.Type)
{
RelativeSizeAxes = Axes.X,
Height = 11,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Top = 2, Vertical = 2 }
};
}
}