Skip to content

Commit

Permalink
cmts
Browse files Browse the repository at this point in the history
  • Loading branch information
leohhhn committed Sep 30, 2024
1 parent ec2687b commit 3c21976
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions examples/gno.land/r/leon/cmts/cmts.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

type CommentSet struct {
owner *ownable.Ownable
set *avl.Tree
owner *ownable.Ownable
set *avl.Tree
idCounter *avl.Tree
}

type Comment struct {
Expand All @@ -26,3 +27,11 @@ func NewCommentSet() *CommentSet {
set: avl.NewTree(),
}
}

// NewCommentSetWithOwnable can be used to set the same ownable to multiple items
func NewCommentSetWithOwnable(o *ownable.Ownable) *CommentSet {
return &CommentSet{
owner: o,
set: avl.NewTree(),
}
}

0 comments on commit 3c21976

Please sign in to comment.