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

R# fixes.

This commit is contained in:
naoey 2018-02-26 01:16:46 +05:30
parent 75fdca928e
commit 1ad45b0941
No known key found for this signature in database
GPG Key ID: 3908EC682A3E19C7
5 changed files with 11 additions and 27 deletions

View File

@ -3,10 +3,6 @@ using osu.Game.Rulesets.Scoring;
using Humanizer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests
{

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
@ -13,26 +8,22 @@ using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Chat;
using osu.Game.Screens.Select.Leaderboards;
using osu.Game.Users;
using static osu.Game.Online.API.Requests.RecentActivity;
namespace osu.Game.Overlays.Profile.Sections.Recent
{
public class DrawableRecentActivity : DrawableProfileRow
{
private RecentActivity activity;
private User user;
private APIAccess api;
private string userLinkTemplate;
private string beatmapLinkTemplate;
private readonly RecentActivity activity;
private readonly string userLinkTemplate;
private readonly string beatmapLinkTemplate;
private LinkFlowContainer content;
public DrawableRecentActivity(RecentActivity activity, User user)
public DrawableRecentActivity(RecentActivity activity)
{
this.activity = activity;
this.user = user;
userLinkTemplate = $"[{urlToAbsolute(activity.User?.Url)} {activity.User?.Username}]";
beatmapLinkTemplate = $"[{urlToAbsolute(activity.Beatmap?.Url)} {activity.Beatmap?.Title}]";

View File

@ -1,17 +1,12 @@
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Recent;
using osu.Game.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.Overlays.Profile.Sections
namespace osu.Game.Overlays.Profile.Sections.Recent
{
class PaginatedRecentActivityContainer : PaginatedContainer
internal class PaginatedRecentActivityContainer : PaginatedContainer
{
public PaginatedRecentActivityContainer(Bindable<User> user, string header, string missing)
: base(user, header, missing)
@ -40,7 +35,7 @@ namespace osu.Game.Overlays.Profile.Sections
foreach (RecentActivity activity in activities)
{
ItemsContainer.Add(new DrawableRecentActivity(activity, User));
ItemsContainer.Add(new DrawableRecentActivity(activity));
}
};

View File

@ -1,6 +1,8 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Overlays.Profile.Sections.Recent;
namespace osu.Game.Overlays.Profile.Sections
{
public class RecentSection : ProfileSection

View File

@ -78,7 +78,7 @@ namespace osu.Game.Overlays
if (userId == Header.User.Id)
return;
ShowUser(new User { Id = userId }, true);
ShowUser(new User { Id = userId });
}
public void ShowUser(User user, bool fetchOnline = true)