compiles properly now

(cherry picked from commit a000c7b35937bbfc94909cf2da092e90a27161f1)
This commit is contained in:
Evaisa 2025-11-03 23:55:28 +01:00 committed by Tobias Berger
parent daf070f876
commit fc558e41ea
No known key found for this signature in database
GPG Key ID: 2D05EFAB764D6A88
1 changed files with 5 additions and 3 deletions

View File

@ -788,8 +788,8 @@ public sealed class NanoChatCartridgeSystem : EntitySystem
jobTitle = idCard.LocalizedJobTitle;
name = idCard.FullName ?? name;
// Funky Station Start - Department Sorting: Get primary department
if (idCard.JobDepartments.Count > 0)
department = idCard.JobDepartments[0];
if (idCard.JobDepartments is { } depts && depts.Count > 0)
department = depts[0].ToString();
// Funky Station End - Department Sorting
}
@ -821,7 +821,9 @@ public sealed class NanoChatCartridgeSystem : EntitySystem
{
// Funky Station Start - Department Sorting: Include department and job title in contacts
var jobTitle = idCardComponent.LocalizedJobTitle;
var department = idCardComponent.JobDepartments.Count > 0 ? idCardComponent.JobDepartments[0].ToString() : null;
string? department = null;
if (idCardComponent.JobDepartments is { } depts && depts.Count > 0)
department = depts[0].ToString();
contacts.Add(new NanoChatRecipient(nanoChatNumber, fullName, jobTitle, department));
// Funky Station End - Department Sorting
}