Skip to content

Commit

Permalink
Define remoteID in PageBookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
mohannad-hassan committed Jan 28, 2025
1 parent 1a98973 commit 22945c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Domain/AnnotationsService/Sources/PageBookmarkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ private extension PageBookmark {
init(quran: Quran, _ other: PageBookmarkPersistenceModel) {
self.init(
page: Page(quran: quran, pageNumber: Int(other.page))!,
creationDate: other.creationDate
creationDate: other.creationDate,
remoteID: other.remoteID
)
}
}
4 changes: 3 additions & 1 deletion Model/QuranAnnotations/PageBookmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ import QuranKit
public struct PageBookmark: Equatable, Identifiable {
// MARK: Lifecycle

public init(page: Page, creationDate: Date) {
public init(page: Page, creationDate: Date, remoteID: String? = nil) {
self.page = page
self.creationDate = creationDate
self.remoteID = remoteID
}

// MARK: Public

public let page: Page
public let creationDate: Date
public let remoteID: String?

public var id: Page { page }
}

0 comments on commit 22945c2

Please sign in to comment.