mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Move notification to stateful client so it is only shown to the user from one location
This commit is contained in:
parent
a1d42dc4a0
commit
569c4092ef
@ -11,6 +11,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Online.API;
|
||||
@ -81,7 +82,10 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
{
|
||||
// clean up local room state on server disconnect.
|
||||
if (!connected.NewValue)
|
||||
{
|
||||
Logger.Log("Connection to multiplayer server was lost.", LoggingTarget.Runtime, LogLevel.Important);
|
||||
LeaveRoom();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.RealtimeMultiplayer;
|
||||
@ -18,6 +17,7 @@ using osu.Game.Screens.Multi.RealtimeMultiplayer.Match;
|
||||
using osu.Game.Screens.Multi.RealtimeMultiplayer.Participants;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Users;
|
||||
using ParticipantsList = osu.Game.Screens.Multi.RealtimeMultiplayer.Participants.ParticipantsList;
|
||||
|
||||
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
||||
{
|
||||
@ -106,7 +106,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
||||
new Drawable[] { new ParticipantsListHeader() },
|
||||
new Drawable[]
|
||||
{
|
||||
new Participants.ParticipantsList
|
||||
new ParticipantsList
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
@ -182,10 +182,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
||||
isConnected.BindValueChanged(connected =>
|
||||
{
|
||||
if (!connected.NewValue)
|
||||
{
|
||||
Logger.Log("Connection to multiplayer server was lost.", LoggingTarget.Runtime, LogLevel.Important);
|
||||
Schedule(this.Exit);
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user