fix: codebase audit fixes — safety, accessibility, and production hygiene
Address 16 issues from external audit: - Move StoreKit transaction listener ownership to StoreManager singleton with proper deinit - Remove noisy VoiceOver announcements, add missing accessibility on StatPill and BootstrapLoadingView - Replace String @retroactive Identifiable with IdentifiableShareCode wrapper - Add crash guard in AchievementEngine getContributingVisitIds + cache stadium lookups - Pre-compute GamesHistoryViewModel filtered properties to avoid redundant SwiftUI recomputation - Remove force-unwraps in ProgressMapView with safe guard-let fallback - Add diff-based update gating in ItineraryTableViewWrapper to prevent unnecessary reloads - Replace deprecated UIScreen.main with UIWindowScene lookup - Add deinit task cancellation in ScheduleViewModel and SuggestedTripsGenerator - Wrap ~234 unguarded print() calls across 27 files in #if DEBUG Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
// MARK: - Identifiable Share Code
|
||||
|
||||
struct IdentifiableShareCode: Identifiable {
|
||||
let id: String
|
||||
var value: String { id }
|
||||
}
|
||||
|
||||
// MARK: - Deep Link Handler
|
||||
|
||||
@MainActor
|
||||
@@ -19,7 +26,7 @@ final class DeepLinkHandler {
|
||||
|
||||
/// The pending poll share code from a deep link
|
||||
/// Setting to nil clears the pending state
|
||||
var pendingPollShareCode: String? {
|
||||
var pendingPollShareCode: IdentifiableShareCode? {
|
||||
didSet {
|
||||
if pendingPollShareCode == nil {
|
||||
pendingPoll = nil
|
||||
@@ -49,7 +56,7 @@ final class DeepLinkHandler {
|
||||
|
||||
switch destination {
|
||||
case .poll(let shareCode):
|
||||
pendingPollShareCode = shareCode
|
||||
pendingPollShareCode = IdentifiableShareCode(id: shareCode)
|
||||
}
|
||||
|
||||
return destination
|
||||
|
||||
Reference in New Issue
Block a user