From 454c7538c0dcc38fc823ae1d59d43475d9ccd8c9 Mon Sep 17 00:00:00 2001 From: Angela Zhang Date: Thu, 17 Dec 2020 17:59:36 -0600 Subject: [PATCH] CI Style Fixes --- osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs | 7 ++++--- osu.Game/Online/Chat/ChannelManager.cs | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs index 12a24963c4..52dafbcfb2 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs @@ -219,8 +219,8 @@ namespace osu.Game.Tests.Visual.Online // Want to close channel 2 AddStep("Select channel 2", () => clickDrawable(chatOverlay.TabMap[channel2])); + AddStep("Press Ctrl + W", pressControlW); - AddStep("Press Ctrl + W", () => pressControlW()); // Channel 2 should be closed AddAssert("Channel 1 open", () => channelManager.JoinedChannels.Contains(channel1)); AddAssert("Channel 2 closed", () => !channelManager.JoinedChannels.Contains(channel2)); @@ -228,7 +228,7 @@ namespace osu.Game.Tests.Visual.Online // Want to close channel 1 AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1])); - AddStep("Press Ctrl + W", () => pressControlW()); + AddStep("Press Ctrl + W", pressControlW); // Channel 1 and channel 2 should be closed AddAssert("All channels closed", () => !channelManager.JoinedChannels.Any()); } @@ -243,7 +243,8 @@ namespace osu.Game.Tests.Visual.Online }); // Want to join another channel - AddStep("Press Ctrl + T", () => pressControlT()); + AddStep("Press Ctrl + T", pressControlT); + // Selector should be visible AddAssert("Selector is visible", () => chatOverlay.SelectionOverlayState == Visibility.Visible); } diff --git a/osu.Game/Online/Chat/ChannelManager.cs b/osu.Game/Online/Chat/ChannelManager.cs index 54ef3c6c30..5936c4e580 100644 --- a/osu.Game/Online/Chat/ChannelManager.cs +++ b/osu.Game/Online/Chat/ChannelManager.cs @@ -33,7 +33,6 @@ namespace osu.Game.Online.Chat private readonly BindableList availableChannels = new BindableList(); private readonly BindableList joinedChannels = new BindableList(); - /// /// Keeps a list of closed channel identifiers. Stores the channel ID for normal /// channels, or the user ID for PM channels @@ -461,8 +460,9 @@ namespace osu.Game.Online.Chat closedChannelIds.RemoveAt(closedChannelIds.Count - 1); bool lookupCondition(Channel ch) => - ch.Type == ChannelType.PM ? ch.Users.Any(u => u.Id == lastClosedChannelId) - : ch.Id == lastClosedChannelId; + ch.Type == ChannelType.PM + ? ch.Users.Any(u => u.Id == lastClosedChannelId) + : ch.Id == lastClosedChannelId; // If the user hasn't already joined the channel, try to join it if (joinedChannels.FirstOrDefault(lookupCondition) == null) @@ -480,6 +480,7 @@ namespace osu.Game.Online.Chat req.Success += user => CurrentChannel.Value = JoinChannel(new Channel(user)); api.Queue(req); } + return; } }