1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Added parameter for LoadMultiplayerLobby (CI warning for unused int)

This commit is contained in:
FreezyLemon 2017-12-07 19:38:03 +01:00
parent e05618a415
commit 908553ffaf
2 changed files with 5 additions and 7 deletions

View File

@ -14,10 +14,8 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Overlays;
using osu.Game.Overlays.Chat;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace osu.Game.Online.Chat
@ -100,11 +98,11 @@ namespace osu.Game.Online.Chat
if (!int.TryParse(url.Split('/').ElementAtOrDefault(1), out int multiId))
return;
chat.Game?.LoadMultiplayerLobby();
chat.Game?.LoadMultiplayerLobby(multiId);
}
else if (url.StartsWith("http://") || url.StartsWith("https://") && url.IndexOf("osu.ppy.sh/") != -1)
else if (url.StartsWith("http://") || url.StartsWith("https://") && url.IndexOf("osu.ppy.sh/", StringComparison.InvariantCultureIgnoreCase) != -1)
{
var osuUrlIndex = url.IndexOf("osu.ppy.sh/");
var osuUrlIndex = url.IndexOf("osu.ppy.sh/", StringComparison.InvariantCultureIgnoreCase);
url = url.Substring(osuUrlIndex + 11);
if (url.StartsWith("s/") || url.StartsWith("beatmapsets/") || url.StartsWith("d/"))
@ -176,7 +174,7 @@ namespace osu.Game.Online.Chat
OnLoadComplete = d =>
{
// All sprites in the same chatline that represent the same URL
SameLinkSprites = (d.Parent as Container<Drawable>).Children.Where(child => (child as ChatLink)?.LinkId == LinkId && !d.Equals(child)).Cast<ChatLink>();
SameLinkSprites = ((Container<Drawable>)d.Parent).Children.Where(child => (child as ChatLink)?.LinkId == LinkId && !d.Equals(child)).Cast<ChatLink>();
};
}

View File

@ -134,7 +134,7 @@ namespace osu.Game
});
}
internal void LoadMultiplayerLobby()
internal void LoadMultiplayerLobby(int lobbyId)
{
notificationOverlay.Post(new SimpleNotification
{