mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into realm-integration/score-and-beatmaps
This commit is contained in:
@ -90,13 +90,16 @@ namespace osu.Game.Online.Chat
|
||||
{
|
||||
// Polling will eventually be replaced with websocket, but let's avoid doing these background operations as much as possible for now.
|
||||
// The only loss will be delayed PM/message highlight notifications.
|
||||
int millisecondsBetweenPolls = HighPollRate.Value ? 1000 : 60000;
|
||||
|
||||
if (HighPollRate.Value)
|
||||
TimeBetweenPolls.Value = 1000;
|
||||
else if (!isIdle.Value)
|
||||
TimeBetweenPolls.Value = 60000;
|
||||
else
|
||||
TimeBetweenPolls.Value = 600000;
|
||||
if (isIdle.Value)
|
||||
millisecondsBetweenPolls *= 10;
|
||||
|
||||
if (TimeBetweenPolls.Value != millisecondsBetweenPolls)
|
||||
{
|
||||
TimeBetweenPolls.Value = millisecondsBetweenPolls;
|
||||
Logger.Log($"Chat is now polling every {TimeBetweenPolls.Value} ms");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
protected readonly ChatTextBox TextBox;
|
||||
|
||||
protected ChannelManager ChannelManager;
|
||||
private ChannelManager channelManager;
|
||||
|
||||
private StandAloneDrawableChannel drawableChannel;
|
||||
|
||||
@ -80,7 +80,7 @@ namespace osu.Game.Online.Chat
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(ChannelManager manager)
|
||||
{
|
||||
ChannelManager ??= manager;
|
||||
channelManager ??= manager;
|
||||
}
|
||||
|
||||
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
||||
@ -94,9 +94,9 @@ namespace osu.Game.Online.Chat
|
||||
return;
|
||||
|
||||
if (text[0] == '/')
|
||||
ChannelManager?.PostCommand(text.Substring(1), Channel.Value);
|
||||
channelManager?.PostCommand(text.Substring(1), Channel.Value);
|
||||
else
|
||||
ChannelManager?.PostMessage(text, target: Channel.Value);
|
||||
channelManager?.PostMessage(text, target: Channel.Value);
|
||||
|
||||
TextBox.Text = string.Empty;
|
||||
}
|
||||
|
Reference in New Issue
Block a user