- Rename source module from RDReaderView to RDEpubReaderView - Move all source files from Sources/RDReaderView/ to Sources/RDEpubReaderView/ - Update podspec: RDReaderView.podspec -> RDEpubReaderView.podspec - Update Podfile, demo project, and CocoaPods config for new pod name - Delete old RDReaderView pod support files from ReadViewDemo/Pods - Add new RDEpubReaderView pod support files - Update documentation (API ref, architecture, UML, conventions, etc.) - Add FixedLayoutRotationTests - Update .gitignore: exclude .DS_Store, manual unpack backups, _ssoft-output
30 lines
766 B
Swift
30 lines
766 B
Swift
import Foundation
|
|
|
|
public struct RDEPUBChapterLocation: Codable, Equatable {
|
|
|
|
public var spineIndex: Int
|
|
|
|
public var chapterOffset: Int
|
|
|
|
public var fragmentID: String?
|
|
|
|
public var progressionInChapter: Double?
|
|
|
|
public var schemaVersion: Int
|
|
|
|
public init(
|
|
spineIndex: Int,
|
|
chapterOffset: Int,
|
|
fragmentID: String? = nil,
|
|
progressionInChapter: Double? = nil,
|
|
schemaVersion: Int = 2
|
|
) {
|
|
self.spineIndex = spineIndex
|
|
self.chapterOffset = chapterOffset
|
|
self.fragmentID = fragmentID.flatMap { $0.isEmpty ? nil : $0 }
|
|
self.progressionInChapter = progressionInChapter
|
|
self.schemaVersion = schemaVersion
|
|
}
|
|
|
|
var isFallbackEstimate: Bool { schemaVersion == 1 }
|
|
} |