mirror of
https://github.com/yattee/yattee.git
synced 2025-10-11 01:48:12 +00:00
Minor fixes
This commit is contained in:
@@ -217,7 +217,15 @@ struct Video: Identifiable, Equatable, Hashable {
|
||||
}
|
||||
|
||||
var publishedDate: String? {
|
||||
(published.isEmpty || published == "0 seconds ago") ? publishedAt?.timeIntervalSince1970.formattedAsRelativeTime() : published
|
||||
guard let publishedAt else {
|
||||
return (published.isEmpty || published == "0 seconds ago") ? nil : published
|
||||
}
|
||||
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateStyle = .short
|
||||
dateFormatter.timeStyle = .none
|
||||
|
||||
return dateFormatter.string(from: publishedAt)
|
||||
}
|
||||
|
||||
var viewsCount: String? {
|
||||
|
Reference in New Issue
Block a user