Watch: keep Recent past 10 behind an N more row with a full list, and settle all in one call
This commit is contained in:
1 parent
2a127327bf
commit
a5222e14e8
13 files changed
+384
-52
No files matched your search
@@ -5,6 +5,8 @@ import Foundation
|
||||
enum Route: Hashable, Sendable {
|
||||
case thread(hostId: String, threadId: String)
|
||||
case newThread
|
||||
/// Every thread in Recent, past the feed's first 10.
|
||||
case recent
|
||||
/// The status overview, and from it one host or the notifications page.
|
||||
case status
|
||||
case host(id: String)
|
||||
@@ -12,7 +14,7 @@ enum Route: Hashable, Sendable {
|
||||
|
||||
static let scheme = "wristcode"
|
||||
|
||||
/// `wristcode://thread/<hostId>/<threadId>`, `wristcode://new`, `wristcode://status`,
|
||||
/// `wristcode://thread/<hostId>/<threadId>`, `wristcode://new`, `wristcode://recent`, `wristcode://status`,
|
||||
/// `wristcode://host/<hostId>` or `wristcode://notifications`.
|
||||
var url: URL {
|
||||
var components = URLComponents()
|
||||
@@ -25,6 +27,8 @@ enum Route: Hashable, Sendable {
|
||||
.joined(separator: "/")
|
||||
case .newThread:
|
||||
components.host = "new"
|
||||
case .recent:
|
||||
components.host = "recent"
|
||||
case .status:
|
||||
components.host = "status"
|
||||
case let .host(id):
|
||||
@@ -47,6 +51,8 @@ enum Route: Hashable, Sendable {
|
||||
self = .thread(hostId: parts[0], threadId: parts[1])
|
||||
case "new":
|
||||
self = .newThread
|
||||
case "recent":
|
||||
self = .recent
|
||||
case "status":
|
||||
self = .status
|
||||
case "host" where parts.count == 1 && !parts[0].isEmpty:
|
||||
|
||||
Reference in new issue
Block a user