Let rows update their counts, drop fake dates, and own failed lookups

MAC6: a snapshot mutation carries its video count back to the list cache.
MAC8: playlist rows and cards are Buttons with the context menu attached,
so macOS accessibility can reach Edit and Delete.
MAC10: a published date stamped with the request's own time is dropped at
both API sentinels, and formattedPublishedDate refuses zero-interval output.
MAC11: a failed history hydration shows Details unavailable with a Try
Again action instead of keeping the raw video ID forever; an empty 200
body is a legible failure.
This commit is contained in:
Arkadiusz Fal
2026-09-11 20:28:35 +02:00
parent 3281840a8e
commit c0d38834a6
9 changed files with 268 additions and 41 deletions

View File

@@ -819,9 +819,15 @@ enum PipedSentinel {
/// The upload date Piped actually has, or nil for its `-1` sentinel.
/// Piped sends this field as epoch **milliseconds**.
///
/// A stamp of the moment the instance answered is the other reading that
/// means nothing — it renders as "in 0 seconds" — and is dropped the same
/// way.
static func uploadedDate(_ raw: Int64?) -> Date? {
guard let raw, raw >= 0 else { return nil }
return Date(timeIntervalSince1970: TimeInterval(raw) / 1000)
let date = Date(timeIntervalSince1970: TimeInterval(raw) / 1000)
guard !RelativeDateFormatter.isStampedNow(date) else { return nil }
return date
}
}