From: Sergey Matveev Date: Wed, 10 Apr 2024 22:28:11 +0000 (+0300) Subject: Smaller talk-detection timeout X-Git-Tag: v1.0.0~16 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e6b3e78a10465ee22f53961404ea546bad70f16b41f5e55ea3b1ee29b00a1bd6;p=vors.git Smaller talk-detection timeout --- diff --git a/cmd/client/stats.go b/cmd/client/stats.go index 41747cb..24e3f99 100644 --- a/cmd/client/stats.go +++ b/cmd/client/stats.go @@ -71,7 +71,7 @@ func statsDrawer(stats *Stats, name string) { if name == *Name && Muted { s += " | " + vors.CRed + "MUTE" + vors.CReset } else { - if stats.last.Add(time.Second).After(now) { + if stats.last.Add(vors.ScreenRefresh).After(now) { s += " | " + vors.CGreen + "TALK" + vors.CReset } } diff --git a/cmd/server/main.go b/cmd/server/main.go index 76c479c..094d10c 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -218,7 +218,7 @@ func newPeer(connRaw net.Conn) { humanize.IBytes(stats.bytesRx), humanize.IBytes(stats.bytesTx), ) - if stats.last.Add(time.Second).After(now) { + if stats.last.Add(vors.ScreenRefresh).After(now) { s += " | " + vors.CGreen + "TALK" + vors.CReset } v, err = GUI.View(peer.name)