Clear four compiler warnings in E2EInbox and TodayStore
ci / vectors-head (push) Successful in 10s
ci / secret-sweep (push) Successful in 28s
ci / parity-scrub (push) Successful in 34s
ci / unit-tests (push) Failing after 1h1m38s
ci / ui-tests (push) Failing after 41m35s

Three @Published properties carried internal(set) on an internal
property, which changes nothing. forgetOnThisPhone defaulted its store
to .shared, evaluated outside the main actor; it now takes an optional
and resolves .shared inside the body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-10-20 13:21:38 -04:00
co-authored by Claude Opus 5.5
parent a50d12722f
commit abd2a557e9
2 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -542,13 +542,13 @@ final class E2EInbox: ObservableObject {
/// Section 17.6 and 8.9d, see `E2EInbox+AccountState.swift`. Written only
/// through `writeSync` and the merge of what linked devices send.
@Published internal(set) var syncState = SyncState()
@Published var syncState = SyncState()
/// Section 17.3: the code this device is showing so a linked device can
/// link it, and when it stops being good. Memory only: ten minutes, one
/// use.
@Published internal(set) var pendingLinkCode: (code: DeviceLinkCode, expires: Date)?
@Published var pendingLinkCode: (code: DeviceLinkCode, expires: Date)?
/// A numeric-fallback offer held until the person confirms the number here.
@Published internal(set) var pendingNumericOffer: PendingLinkOffer?
@Published var pendingNumericOffer: PendingLinkOffer?
/// What the person is told about changes to the linked set.
@Published var linkNotices: [LinkNotice] = []
/// Section 17.6: ops written here, waiting to go to the linked devices.
+4 -2
View File
@@ -393,8 +393,10 @@ final class TodayStore: ObservableObject {
/// other traces. The file is public; the picks say where somebody cares
/// about, and the next person to use this phone has no business with
/// either.
static func forgetOnThisPhone(_ store: TodayStore = .shared, defaults: UserDefaults = .standard) {
store.forgetEverything()
/// `store` is optional because a default of `.shared` is evaluated
/// outside the main actor, which Swift 6 refuses.
static func forgetOnThisPhone(_ store: TodayStore? = nil, defaults: UserDefaults = .standard) {
(store ?? .shared).forgetEverything()
defaults.removeObject(forKey: TodayPlaces.key)
}
}