Fix diff screen hang/crash: stable DiffLine id + request timeout; bump to 1.5
Build iOS App / Build .ipa and publish source (push) Successful in 22s

DiffLine.id was a computed property returning a fresh UUID() on every access.
SwiftUI's ForEach requires stable identities; regenerating each read churned
the main thread, hanging the diff screen and eventually crashing. Store the
UUID once per line. Also add a 30s URLRequest timeout so a hung request can't
leave the 'Loading diff...' spinner forever. Bump to 1.5.
This commit is contained in:
Hermes committed 2026-08-12 21:36:34 +00:00
1 parent 8be8f3ac50
commit db694543c1
3 files changed
+10 -5

No files matched your search

+2
View File
@@ -71,6 +71,8 @@ struct GiteaClient {
req.httpMethod = method
req.setValue("token \(token)", forHTTPHeaderField: "Authorization")
req.setValue("application/json", forHTTPHeaderField: "Accept")
// Bound every request so a hung call can't leave a spinner forever.
req.timeoutInterval = 30
if let body {
req.setValue("application/json", forHTTPHeaderField: "Content-Type")
req.httpBody = body