- Progress indicator as a compact circle at the bottom right of the CardView, with percent display - Jump-to-progress button in detail view, using ScrollPosition logic (removed iOS 17 mention) - Archive/Unarchive button with flexible parameter and label - Various bugfixes and refactoring (progress, mock, WebView, strings) - Improved reading progress logic and display - Code cleanup: removed debug prints, mutated properties directly
47 lines
981 B
Swift
47 lines
981 B
Swift
import Foundation
|
|
|
|
struct BookmarkDetail {
|
|
let id: String
|
|
let title: String
|
|
let url: String
|
|
let description: String
|
|
let siteName: String
|
|
let authors: [String]
|
|
let created: String
|
|
let updated: String
|
|
let wordCount: Int?
|
|
let readingTime: Int?
|
|
let hasArticle: Bool
|
|
var isMarked: Bool
|
|
var isArchived: Bool
|
|
let labels: [String]
|
|
let thumbnailUrl: String
|
|
let imageUrl: String
|
|
let lang: String
|
|
var content: String?
|
|
let readProgress: Int?
|
|
}
|
|
|
|
extension BookmarkDetail {
|
|
static let empty = BookmarkDetail(
|
|
id: "",
|
|
title: "",
|
|
url: "",
|
|
description: "",
|
|
siteName: "",
|
|
authors: [],
|
|
created: "",
|
|
updated: "",
|
|
wordCount: 0,
|
|
readingTime: 0,
|
|
hasArticle: false,
|
|
isMarked: false,
|
|
isArchived: false,
|
|
labels: [],
|
|
thumbnailUrl: "",
|
|
imageUrl: "",
|
|
lang: "",
|
|
readProgress: 0
|
|
)
|
|
}
|