mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Simplified 'Liked'
This commit is contained in:
parent
0521895f11
commit
4cfcc11e20
1 changed files with 1 additions and 6 deletions
|
|
@ -145,12 +145,7 @@ func (c *Comment) Like() error {
|
|||
|
||||
// Liked returns if the user has liked the comment.
|
||||
func (c *Comment) Liked() bool {
|
||||
for _, flag := range c.Flags {
|
||||
if flag == "liked" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return c.markedAs("liked")
|
||||
}
|
||||
|
||||
// RemoveLike removes the like from the comment. Works only if the user has liked it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue