mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Rename HighlightsList to Notebook
This commit is contained in:
parent
522ea0a3c3
commit
fd853e65ee
5 changed files with 6 additions and 6 deletions
|
|
@ -9,7 +9,7 @@
|
|||
@State var annotation = String()
|
||||
@State var showAnnotationModal = false
|
||||
|
||||
let viewModel: HighlightsListViewModel
|
||||
let viewModel: NotebookViewModel
|
||||
let highlightParams: HighlightListItemParams
|
||||
@Binding var hasHighlightMutations: Bool
|
||||
let onSaveAnnotation: (String) -> Void
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
import SwiftUI
|
||||
import Views
|
||||
|
||||
struct HighlightsListView: View {
|
||||
struct NotebookView: View {
|
||||
@EnvironmentObject var dataService: DataService
|
||||
@Environment(\.presentationMode) private var presentationMode
|
||||
@StateObject var viewModel = HighlightsListViewModel()
|
||||
@StateObject var viewModel = NotebookViewModel()
|
||||
|
||||
let itemObjectID: NSManagedObjectID
|
||||
@Binding var hasHighlightMutations: Bool
|
||||
|
|
@ -14,7 +14,7 @@ struct HighlightListItemParams: Identifiable {
|
|||
let createdBy: InternalUserProfile?
|
||||
}
|
||||
|
||||
@MainActor final class HighlightsListViewModel: ObservableObject {
|
||||
@MainActor final class NotebookViewModel: ObservableObject {
|
||||
@Published var highlightItems = [HighlightListItemParams]()
|
||||
|
||||
func load(itemObjectID: NSManagedObjectID, dataService: DataService) {
|
||||
|
|
@ -81,7 +81,7 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||
LinkedItemMetadataEditView(item: item)
|
||||
}
|
||||
.sheet(item: $viewModel.itemForHighlightsView) { item in
|
||||
HighlightsListView(itemObjectID: item.objectID, hasHighlightMutations: $hasHighlightMutations)
|
||||
NotebookView(itemObjectID: item.objectID, hasHighlightMutations: $hasHighlightMutations)
|
||||
}
|
||||
.sheet(isPresented: $viewModel.showCommunityModal) {
|
||||
CommunityModal()
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ struct WebReaderContainerView: View {
|
|||
}
|
||||
#if os(iOS)
|
||||
.sheet(isPresented: $showHighlightsView, onDismiss: onHighlightListViewDismissal) {
|
||||
HighlightsListView(
|
||||
NotebookView(
|
||||
itemObjectID: item.objectID,
|
||||
hasHighlightMutations: $hasPerformedHighlightMutations
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue