Add tag command
This commit is contained in:
@ -248,7 +248,7 @@ struct PageIssueView: View {
|
||||
return
|
||||
}
|
||||
|
||||
let tag = Tag(id: tagId)
|
||||
let tag = Tag(content: content, id: tagId)
|
||||
content.tags.append(tag)
|
||||
|
||||
retryPageCheck()
|
||||
|
@ -24,9 +24,11 @@ struct AddTagView: View {
|
||||
}
|
||||
|
||||
private func addNewTag() {
|
||||
let newTag = Tag(isVisible: true,
|
||||
german: .init(urlComponent: "tag", name: "Neuer Tag"),
|
||||
english: .init(urlComponent: "tag-en", name: "New Tag"))
|
||||
let newTag = Tag(
|
||||
content: content,
|
||||
isVisible: true,
|
||||
german: .init(urlComponent: "tag", name: "Neuer Tag"),
|
||||
english: .init(urlComponent: "tag-en", name: "New Tag"))
|
||||
// Add to top of the list, and resort when changing the name
|
||||
content.tags.insert(newTag, at: 0)
|
||||
dismiss()
|
||||
|
Reference in New Issue
Block a user