~whereswaldon/sprig

ref: v0.0.16 sprig/widget/reply.go -rw-r--r-- 351 bytes
fbfe7d32Chris Waldon fix: use concrete ds.ReplyData as target of reply methods and focus 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package widget

import (
	"git.sr.ht/~whereswaldon/forest-go/fields"
)

// Reply holds ui state for each reply.
type Reply struct {
	Hash    *fields.QualifiedHash
	Content string
	Polyclick
}

func (r *Reply) WithHash(h *fields.QualifiedHash) *Reply {
	r.Hash = h
	return r
}

func (r *Reply) WithContent(s string) *Reply {
	r.Content = s
	return r
}