Rework storage structs, link preview
This commit is contained in:
@ -17,7 +17,7 @@ extension ImageToGenerate: Hashable {
|
||||
|
||||
final class PageGenerationResults: ObservableObject {
|
||||
|
||||
let itemId: ItemId
|
||||
let itemId: LocalizedItemId
|
||||
|
||||
private unowned let delegate: GenerationResults
|
||||
|
||||
@ -73,13 +73,13 @@ final class PageGenerationResults: ObservableObject {
|
||||
private(set) var warnings: Set<String>
|
||||
|
||||
/// The files that could not be saved to the output folder
|
||||
private(set) var unsavedOutputFiles: [String: Set<ItemType>] = [:]
|
||||
private(set) var unsavedOutputFiles: [String: Set<ItemReference>] = [:]
|
||||
|
||||
private(set) var pageIsEmpty: Bool
|
||||
|
||||
private(set) var redirect: (originalUrl: String, newUrl: String)?
|
||||
|
||||
init(itemId: ItemId, delegate: GenerationResults) {
|
||||
init(itemId: LocalizedItemId, delegate: GenerationResults) {
|
||||
self.itemId = itemId
|
||||
self.delegate = delegate
|
||||
inaccessibleFiles = []
|
||||
@ -245,7 +245,7 @@ final class PageGenerationResults: ObservableObject {
|
||||
delegate.warning(warning)
|
||||
}
|
||||
|
||||
func unsavedOutput(_ path: String, source: ItemType) {
|
||||
func unsavedOutput(_ path: String, source: ItemReference) {
|
||||
unsavedOutputFiles[path, default: []].insert(source)
|
||||
delegate.unsaved(path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user