Dont allow deleting system labels
This commit is contained in:
@ -98,33 +98,35 @@
|
||||
}
|
||||
).padding(.trailing, 5)
|
||||
|
||||
Button(
|
||||
action: { performArchive() },
|
||||
label: {
|
||||
if audioController.itemAudioProperties?.isArchived ?? false {
|
||||
Image
|
||||
.toolbarUnarchive
|
||||
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
} else {
|
||||
Image
|
||||
.toolbarArchive
|
||||
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
}
|
||||
}
|
||||
).padding(.trailing, 5)
|
||||
|
||||
Menu(content: {
|
||||
if !(audioController.itemAudioProperties?.isArchived ?? false) {
|
||||
Button(
|
||||
action: { performViewArticle() },
|
||||
action: { performArchive() },
|
||||
label: {
|
||||
Text("View article")
|
||||
if audioController.itemAudioProperties?.isArchived ?? false {
|
||||
Image
|
||||
.toolbarUnarchive
|
||||
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
} else {
|
||||
Image
|
||||
.toolbarArchive
|
||||
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
}
|
||||
}
|
||||
)
|
||||
}, label: {
|
||||
Image
|
||||
.utilityMenu
|
||||
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
})
|
||||
).padding(.trailing, 5)
|
||||
}
|
||||
|
||||
// Menu(content: {
|
||||
// Button(
|
||||
// action: { performViewArticle() },
|
||||
// label: {
|
||||
// Text("View article")
|
||||
// }
|
||||
// )
|
||||
// }, label: {
|
||||
// Image
|
||||
// .utilityMenu
|
||||
// .foregroundColor(ThemeManager.currentTheme.toolbarColor)
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ struct LabelsView: View {
|
||||
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
@AppStorage(UserDefaultKey.hideSystemLabels.rawValue, store: UserDefaults(suiteName: "group.app.omnivoreapp")) var hideSystemLabels = false
|
||||
@AppStorage(UserDefaultKey.hideSystemLabels.rawValue) var hideSystemLabels = false
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
@ -21,13 +21,15 @@ struct LabelsView: View {
|
||||
HStack {
|
||||
TextChip(feedItemLabel: label).allowsHitTesting(false)
|
||||
Spacer()
|
||||
Button(
|
||||
action: {
|
||||
labelToRemove = label
|
||||
showDeleteConfirmation = true
|
||||
},
|
||||
label: { Image(systemName: "trash") }
|
||||
)
|
||||
if !isSystemLabel(label) {
|
||||
Button(
|
||||
action: {
|
||||
labelToRemove = label
|
||||
showDeleteConfirmation = true
|
||||
},
|
||||
label: { Image(systemName: "trash") }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
createLabelButton
|
||||
|
||||
Reference in New Issue
Block a user