Remove unused property

This commit is contained in:
Jackson Harper
2023-07-25 20:48:29 +08:00
parent 0c81a04d06
commit ac38ca2e86
5 changed files with 6 additions and 6 deletions

View File

@ -155,7 +155,7 @@
Spacer(minLength: 120)
.listRowSeparator(.hidden, edges: .all)
}.sheet(item: $setLabelsHighlight) { highlight in
ApplyLabelsView(mode: .highlight(highlight), isSearchFocused: false, onSave: { selectedLabels in
ApplyLabelsView(mode: .highlight(highlight), onSave: { selectedLabels in
hasHighlightMutations = true
viewModel.setLabelsForHighlight(highlightID: highlight.unwrappedID,

View File

@ -81,7 +81,7 @@ struct AnimatingCellHeight: AnimatableModifier {
loadItems(isRefresh: true)
}
.sheet(item: $viewModel.itemUnderLabelEdit) { item in
ApplyLabelsView(mode: .item(item), isSearchFocused: false, onSave: nil)
ApplyLabelsView(mode: .item(item), onSave: nil)
}
.sheet(item: $viewModel.itemUnderTitleEdit) { item in
LinkedItemMetadataEditView(item: item)

View File

@ -141,7 +141,7 @@ import Views
Button(LocalText.cancelGeneric, role: .cancel) { self.itemToRemove = nil }
}
.sheet(item: $viewModel.itemUnderLabelEdit) { item in
ApplyLabelsView(mode: .item(item), isSearchFocused: false, onSave: nil)
ApplyLabelsView(mode: .item(item), onSave: nil)
}
.sheet(item: $viewModel.itemUnderTitleEdit) { item in
LinkedItemMetadataEditView(item: item)

View File

@ -3,6 +3,7 @@ import Services
import SwiftUI
import Views
@MainActor
struct ApplyLabelsView: View {
enum Mode {
case item(LinkedItem)
@ -29,7 +30,6 @@ struct ApplyLabelsView: View {
}
let mode: Mode
let isSearchFocused: Bool
let onSave: (([LinkedItemLabel]) -> Void)?
@EnvironmentObject var dataService: DataService

View File

@ -337,7 +337,7 @@ struct WebReaderContainerView: View {
.foregroundColor(ThemeManager.currentTheme.isDark ? .white : .black)
.background(ThemeManager.currentBgColor)
.sheet(isPresented: $showLabelsModal) {
ApplyLabelsView(mode: .item(item), isSearchFocused: false, onSave: { labels in
ApplyLabelsView(mode: .item(item), onSave: { labels in
showLabelsModal = false
item.labels = NSSet(array: labels)
readerSettingsChangedTransactionID = UUID()
@ -478,7 +478,7 @@ struct WebReaderContainerView: View {
}
.sheet(isPresented: $showHighlightLabelsModal) {
if let highlight = Highlight.lookup(byID: self.annotation, inContext: self.dataService.viewContext) {
ApplyLabelsView(mode: .highlight(highlight), isSearchFocused: false) { selectedLabels in
ApplyLabelsView(mode: .highlight(highlight)) { selectedLabels in
viewModel.setLabelsForHighlight(highlightID: highlight.unwrappedID,
labelIDs: selectedLabels.map(\.unwrappedID),
dataService: dataService)