1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-27 10:13:20 +08:00

Apply same behavioral changes to NewsCard

This commit is contained in:
Joseph Madamba 2023-05-21 19:28:12 -07:00
parent 2279aad360
commit 7392109bce
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -39,12 +38,12 @@ namespace osu.Game.Overlays.News
}
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider, GameHost host)
private void load(OverlayColourProvider colourProvider, OsuGame? game)
{
if (post.Slug != null)
{
TooltipText = "view in browser";
Action = () => host.OpenUrlExternally("https://osu.ppy.sh/home/news/" + post.Slug);
Action = () => game?.OpenUrlExternally(@"/home/news/" + post.Slug);
}
AddRange(new Drawable[]