Watch: review fixes for action errors that vanished, feed refreshes dropped or overwritten around a change, a fresh thread screen per route, errors cleared on sign out, notification actions only while paired, cache writes off the main thread and capped at 30 threads, Ask before acting and Load earlier races, two-letter search, C# headings, and strictly encoded query values
This commit is contained in:
1 parent
99b300855e
commit
25be69fa30
14 files changed
+591
-94
No files matched your search
@@ -21,6 +21,8 @@ enum Route: Hashable, Sendable {
|
||||
case search(query: String)
|
||||
|
||||
static let scheme = "wristcode"
|
||||
/// The fewest characters the gateway searches for.
|
||||
static let minimumSearch = 2
|
||||
|
||||
/// `wristcode://thread/<hostId>/<threadId>`, `wristcode://new`, `wristcode://recent`, `wristcode://snoozed`,
|
||||
/// `wristcode://status`,
|
||||
@@ -92,7 +94,8 @@ enum Route: Hashable, Sendable {
|
||||
case "project" where parts.count == 2 && parts.allSatisfy { !$0.isEmpty }:
|
||||
self = .projectThreads(hostId: parts[0], projectId: parts[1])
|
||||
case "search":
|
||||
guard let query = components.queryItems?.first(where: { $0.name == "q" })?.value, !query.isEmpty else { return nil }
|
||||
guard let query = components.queryItems?.first(where: { $0.name == "q" })?.value, query.count >= Self.minimumSearch
|
||||
else { return nil }
|
||||
self = .search(query: query)
|
||||
default:
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user