Show volume for users.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user