mirror of
https://github.com/yattee/yattee.git
synced 2026-10-25 06:02:57 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user