mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Add link handling to recent activities.
- Add a show user action to link handling
This commit is contained in:
@ -118,6 +118,8 @@ namespace osu.Game.Online.Chat
|
||||
case "beatmapsets":
|
||||
case "d":
|
||||
return new LinkDetails(LinkAction.OpenBeatmapSet, args[3]);
|
||||
case "u":
|
||||
return new LinkDetails(LinkAction.OpenUserProfile, args[3]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,6 +148,9 @@ namespace osu.Game.Online.Chat
|
||||
case "spectate":
|
||||
linkType = LinkAction.Spectate;
|
||||
break;
|
||||
case "u":
|
||||
linkType = LinkAction.OpenUserProfile;
|
||||
break;
|
||||
default:
|
||||
linkType = LinkAction.External;
|
||||
break;
|
||||
@ -205,6 +210,15 @@ namespace osu.Game.Online.Chat
|
||||
return inputMessage;
|
||||
}
|
||||
|
||||
public static List<Link> GetLinks(string text)
|
||||
{
|
||||
var result = format(text);
|
||||
|
||||
result.Links.Sort();
|
||||
|
||||
return result.Links;
|
||||
}
|
||||
|
||||
public class MessageFormatterResult
|
||||
{
|
||||
public List<Link> Links = new List<Link>();
|
||||
@ -239,6 +253,7 @@ namespace osu.Game.Online.Chat
|
||||
OpenEditorTimestamp,
|
||||
JoinMultiplayerMatch,
|
||||
Spectate,
|
||||
OpenUserProfile,
|
||||
}
|
||||
|
||||
public class Link : IComparable<Link>
|
||||
|
Reference in New Issue
Block a user