mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Fix channel lookup not considering missing ids
This commit is contained in:
parent
cd8402df72
commit
f931bdc5ff
@ -420,7 +420,13 @@ namespace osu.Game.Online.Chat
|
||||
{
|
||||
Channel found = null;
|
||||
|
||||
bool lookupCondition(Channel ch) => lookup.Id > 0 ? ch.Id == lookup.Id : ch.Name == lookup.Name;
|
||||
bool lookupCondition(Channel ch)
|
||||
{
|
||||
if (ch.Id > 0 && lookup.Id > 0)
|
||||
return ch.Id == lookup.Id;
|
||||
|
||||
return ch.Name == lookup.Name;
|
||||
}
|
||||
|
||||
var available = AvailableChannels.FirstOrDefault(lookupCondition);
|
||||
if (available != null)
|
||||
|
Loading…
Reference in New Issue
Block a user