Gofmt
This commit is contained in:
@ -22,12 +22,12 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/html"
|
||||
"maunium.net/go/gomatrix"
|
||||
"maunium.net/go/gomuks/matrix/rooms"
|
||||
"maunium.net/go/gomuks/ui/messages/tstring"
|
||||
"maunium.net/go/gomuks/ui/widget"
|
||||
"maunium.net/go/tcell"
|
||||
"golang.org/x/net/html"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@ -68,7 +68,7 @@ func (parser *htmlParser) getAttribute(node *html.Node, attribute string) string
|
||||
}
|
||||
|
||||
func digits(num int) int {
|
||||
return int(math.Floor(math.Log10(float64(num)))+1)
|
||||
return int(math.Floor(math.Log10(float64(num))) + 1)
|
||||
}
|
||||
|
||||
func (parser *htmlParser) listToTString(node *html.Node, stripLinebreak bool) tstring.TString {
|
||||
|
@ -147,7 +147,7 @@ func getMembershipEventContent(room *rooms.Room, evt *gomatrix.Event) (sender st
|
||||
text = tstring.NewColorTString(fmt.Sprintf("%s changed their display name to %s.", prevDisplayname, displayname), tcell.ColorGreen)
|
||||
color := widget.GetHashColor(*evt.StateKey)
|
||||
text.Colorize(0, len(prevDisplayname), color)
|
||||
text.Colorize(len(prevDisplayname) + len(" changed their display name to "), len(displayname), color)
|
||||
text.Colorize(len(prevDisplayname)+len(" changed their display name to "), len(displayname), color)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user