1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 22:47:26 +08:00
osu-lazer/osu.Game/Overlays/Chat
Dean Herbert 603527d72d Fix potential crash when highlighting chat messages
Test failed locally in `TestPublicChannelMention`. This test seems to
specify that the same message may arrive twice with the same ID, so
rather than overthinking this one I propose we just use `FirstOrDefault`.

```csharp
TearDown : System.AggregateException : One or more errors occurred.
(Sequence contains more than one matching element)
  ----> System.InvalidOperationException : Sequence contains more than
one matching element
--TearDown
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken)
   at osu.Framework.Extensions.TaskExtensions.WaitSafely(Task task)
   at osu.Framework.Testing.TestScene.checkForErrors()
--InvalidOperationException
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source,
Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1
source, Func`2 predicate)
   at
osu.Game.Overlays.Chat.DrawableChannel.<processMessageHighlighting>b__14_0()
in
/Users/dean/Projects/osu/osu.Game/Overlays/Chat/DrawableChannel.cs:line
102
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
```
2022-03-16 18:38:06 +09:00
..
Listing Move ChannelListingItem spacing into item so input is always handled by an item in the list 2022-03-10 15:58:57 +09:00
Selection Remove unnecessary backing field 2021-02-25 14:08:01 +09:00
Tabs Update usages of Drawable.Click() 2021-08-04 17:30:33 +09:00
ChannelScrollContainer.cs Scroll chat line to channel center 2022-03-10 02:50:15 +03:00
ChatLine.cs Instantiate highlight background container on animation 2022-03-10 03:49:42 +03:00
DrawableChannel.cs Fix potential crash when highlighting chat messages 2022-03-16 18:38:06 +09:00
ExternalLinkDialog.cs Update font awesome usage 2019-04-02 19:55:24 +09:00