From e6b3e78a10465ee22f53961404ea546bad70f16b41f5e55ea3b1ee29b00a1bd6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 11 Apr 2024 01:28:11 +0300 Subject: [PATCH] Smaller talk-detection timeout --- cmd/client/stats.go | 2 +- cmd/server/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 2.48.1