fix(ios): clear private native state and apply upstream dark tokens

Discard editor drafts on account/server changes, obscure inactive sheets and clear loaded records even when vault erasure fails. Serialize local removal and distinguish dark tint from primary button fill. Swift format/parsing and sixteen portable tests pass; Apple SDK validation remains outstanding.
This commit is contained in:
Yuvomi Mobile Contributors committed 2026-10-21 09:09:39 +02:00
1 parent 97570b7fdf
commit 81973c3c45
2 files changed
+40 -8

No files matched your search

+4 -2
View File
@@ -175,26 +175,28 @@ final class NativeStore: ObservableObject {
revoked = true
} catch { revoked = false }
await api?.close()
clearLoadedData()
try vault?.clear()
if let address = try? ServerAddress(server), let storage = vault {
api = try NativeAPI(server: address, saved: nil, persist: storage.save)
}
clearLoadedData()
if !revoked { error = "Lokal abgemeldet. Die Abmeldung auf dem Server konnte nicht bestätigt werden." }
}
}
func forget() async {
guard !busy else { return }
busy = true
defer { busy = false }
generation += 1
await api?.close()
clearLoadedData()
do { try vault?.clear() } catch {
self.error = NativeAPIError.unavailable.errorDescription
return
}
api = nil
vault = nil
clearLoadedData()
server = ""
appName = "Yuvomi"
setup = false