1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 21:42:55 +08:00

Revert useless changes varying from properties, naming changes etc.

This commit is contained in:
Craftplacer 2020-01-18 15:40:55 +01:00
parent bc6f71fe97
commit 8ddd36596e
5 changed files with 11 additions and 24 deletions

View File

@ -126,8 +126,8 @@ namespace osu.Game.Online.Chat
{
messages = messages.Except(Messages).ToArray();
if (messages.Length != 0)
{
if (messages.Length == 0) return;
Messages.AddRange(messages);
var maxMessageId = messages.Max(m => m.Id);
@ -138,7 +138,6 @@ namespace osu.Game.Online.Chat
NewMessagesArrived?.Invoke(messages);
}
}
/// <summary>
/// Replace or remove a message from the channel.

View File

@ -49,6 +49,7 @@ namespace osu.Game.Online.Chat
public IBindableList<Channel> AvailableChannels => availableChannels;
private IAPIProvider api;
public readonly BindableBool HighPollRate = new BindableBool();
public ChannelManager()
@ -246,15 +247,7 @@ namespace osu.Game.Online.Chat
var channels = JoinedChannels.ToList();
foreach (var group in messages.GroupBy(m => m.ChannelId))
{
var channel = channels.Find(c => c.Id == group.Key);
if (channel == null)
continue;
var groupArray = group.ToArray();
channel.AddNewMessages(groupArray);
}
channels.Find(c => c.Id == group.Key)?.AddNewMessages(group.ToArray());
}
private void initializeChannels()

View File

@ -26,7 +26,6 @@ namespace osu.Game.Overlays.Chat
public readonly Channel Channel;
protected FillFlowContainer ChatLineFlow;
private OsuScrollContainer scroll;
public ColourInfo HighlightColour { get; set; }
[Resolved]
private OsuColour colours { get; set; }
@ -40,8 +39,6 @@ namespace osu.Game.Overlays.Chat
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
HighlightColour = colours.Blue;
Child = new OsuContextMenuContainer
{
RelativeSizeAxes = Axes.Both,

View File

@ -259,7 +259,7 @@ namespace osu.Game.Overlays
if (ChannelTabControl.Current.Value != e.NewValue)
Scheduler.Add(() => ChannelTabControl.Current.Value = e.NewValue);
var loaded = loadedChannels.Find(drawable => drawable.Channel == e.NewValue);
var loaded = loadedChannels.Find(d => d.Channel == e.NewValue);
if (loaded == null)
{
@ -268,7 +268,6 @@ namespace osu.Game.Overlays
loaded = new DrawableChannel(e.NewValue);
loadedChannels.Add(loaded);
LoadComponentAsync(loaded, l =>
{
if (currentChannel.Value != e.NewValue)

View File

@ -13,7 +13,6 @@ using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Threading;
using System.Collections.Generic;
namespace osu.Game.Overlays
{