Added AddComment(EntryComment).

This commit is contained in:
Erik C. Thauvin 2021-12-05 22:57:58 -08:00
parent 0e80f22b4f
commit 5dd1f89105

View file

@ -94,12 +94,19 @@ class EntryLink(
this.tags.addAll(tags)
}
/**
* Adds a new comment
*/
fun addComment(comment: EntryComment): Int {
comments.add(comment)
return comments.lastIndex
}
/**
* Adds a new comment.
*/
fun addComment(comment: String, nick: String): Int {
comments.add(EntryComment(comment, nick))
return comments.lastIndex
return addComment(EntryComment(comment, nick))
}
/**