commit 6547352f9bb61891576f36f9f031b71f2d99f031
parent 8b6d81274d17a76339e39f874eac2c0c4741e3b1
Author: Michael Camilleri <[email protected]>
Date: Fri, 8 May 2026 23:39:11 +0900
Collapse roster list in Scoreboard
Diffstat:
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/Crossmate/Views/PuzzleView.swift b/Crossmate/Views/PuzzleView.swift
@@ -577,11 +577,10 @@ private struct PuzzleScoreboard: View {
}
private func normalizedAuthorID(_ authorID: String?) -> String? {
- guard let authorID,
- let localAuthorID = roster.localAuthorID,
- authorID == localAuthorID
- else { return authorID }
- return nil
+ guard let authorID else {
+ return roster.entries.contains(where: { !$0.isLocal }) ? nil : roster.localAuthorID
+ }
+ return authorID
}
var body: some View {
diff --git a/Crossmate/Views/SuccessPanel.swift b/Crossmate/Views/SuccessPanel.swift
@@ -104,11 +104,10 @@ struct SuccessPanel: View {
}
private func normalizedAuthorID(_ authorID: String?) -> String? {
- guard let authorID,
- let localAuthorID = roster.localAuthorID,
- authorID == localAuthorID
- else { return authorID }
- return nil
+ guard let authorID else {
+ return roster.entries.contains(where: { !$0.isLocal }) ? nil : roster.localAuthorID
+ }
+ return authorID
}
var body: some View {