Support listing notes by tag
This commit is contained in:
parent
105275f3e0
commit
95865257a3
2 changed files with 17 additions and 4 deletions
|
|
@ -398,3 +398,12 @@ func (n *Note) ToggleBox(nthBox int) {
|
|||
n.Body = buf.Bytes()
|
||||
n.Save()
|
||||
}
|
||||
|
||||
func (n *Note) HasTag(tag string) bool {
|
||||
for _, tag_ := range n.Tags {
|
||||
if tag_ == tag {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue