Merge branch 'Private_Messages' of https://github.com/miterosan/osu into Private_Messages

This commit is contained in:
miterosan
2018-07-09 20:14:16 +02:00
265 changed files with 8460 additions and 3539 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))