Show volume for users.

This commit is contained in:
Storm Dragon
2025-08-28 22:41:08 -04:00
parent b966106727
commit 5ed445060c

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
"git.stormux.org/storm/barnard/gumble/gumble"
"git.stormux.org/storm/barnard/uiterm"
"sort"
@@ -11,7 +12,10 @@ func (ti TreeItem) String() string {
if ti.User.LocallyMuted {
return "[MUTED] " + ti.User.Name
}
return ti.User.Name
// Calculate total volume as percentage
boostPercent := float32(ti.User.Boost-1) * 10
totalVolume := ti.User.Volume*100 + boostPercent
return fmt.Sprintf("%s [%.0f%%]", ti.User.Name, totalVolume)
}
if ti.Channel != nil {
return "#" + ti.Channel.Name