cmd/rpcfetch: update replace counter in ui thread
This commit is contained in:
parent
aa0b11a793
commit
8eb33b2fc0
@ -60,10 +60,8 @@ type applyState struct {
|
|||||||
func (s *applyState) replace(t string) string {
|
func (s *applyState) replace(t string) string {
|
||||||
for k, f := range substitute {
|
for k, f := range substitute {
|
||||||
t = strings.ReplaceAll(t, "%"+k, f(s))
|
t = strings.ReplaceAll(t, "%"+k, f(s))
|
||||||
go func() {
|
replCounter.Add(uint64(len(t)))
|
||||||
replCounter.Add(uint64(len(t)))
|
statusReplaces.SetText(strconv.Itoa(int(replCounter.Load())) + " bytes")
|
||||||
statusReplaces.SetText(strconv.Itoa(int(replCounter.Load())) + " bytes")
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user