mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Fix channel lookup not considering missing ids
This commit is contained in:
@ -420,7 +420,13 @@ namespace osu.Game.Online.Chat
|
|||||||
{
|
{
|
||||||
Channel found = null;
|
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);
|
var available = AvailableChannels.FirstOrDefault(lookupCondition);
|
||||||
if (available != null)
|
if (available != null)
|
||||||
|
Reference in New Issue
Block a user