Merge branch 'master' into Private_Messages

This commit is contained in:
Dean Herbert
2018-06-21 11:37:19 +09:00
committed by GitHub
37 changed files with 1094 additions and 216 deletions

View File

@ -3,11 +3,11 @@
using osu.Game.Online.Chat;
using System;
using System.Diagnostics;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using System.Collections.Generic;
using osu.Framework.Platform;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
@ -25,13 +25,16 @@ namespace osu.Game.Graphics.Containers
private OsuGame game;
private ChannelManager channelManager;
private Action showNotImplementedError;
private GameHost host;
[BackgroundDependencyLoader(true)]
private void load(OsuGame game, NotificationOverlay notifications, ChannelManager channelManager)
private void load(OsuGame game, NotificationOverlay notifications, GameHost host, ChannelManager channelManager)
{
// will be null in tests
this.game = game;
this.host = host;
this.channelManager = channelManager;
showNotImplementedError = () => notifications?.Post(new SimpleNotification
{
Text = @"This link type is not yet supported!",
@ -95,7 +98,7 @@ namespace osu.Game.Graphics.Containers
showNotImplementedError?.Invoke();
break;
case LinkAction.External:
Process.Start(url);
host.OpenUrlExternally(url);
break;
case LinkAction.OpenUserProfile:
if (long.TryParse(linkArgument, out long userId))