Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Fixes #221
Browse files Browse the repository at this point in the history
  • Loading branch information
Bios-Marcel committed Nov 29, 2019
1 parent 69cbd49 commit 755f269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ui/usertree.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (

"github.com/Bios-Marcel/cordless/config"
"github.com/Bios-Marcel/cordless/discordutil"
"github.com/Bios-Marcel/cordless/ui/tviewutil"

"github.com/Bios-Marcel/discordgo"
"github.com/Bios-Marcel/tview"
"github.com/gdamore/tcell"
Expand Down Expand Up @@ -128,7 +130,7 @@ func (userTree *UserTree) loadGuildRoles(guildID string) ([]*discordgo.Role, err

for _, role := range guildRoles {
if role.Hoist {
roleNode := tview.NewTreeNode(role.Name)
roleNode := tview.NewTreeNode(tviewutil.Escape(role.Name))
roleNode.SetSelectable(false)
userTree.roleNodes[role.ID] = roleNode
userTree.rootNode.AddChild(roleNode)
Expand Down
2 changes: 1 addition & 1 deletion ui/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ func NewWindow(doRestart chan bool, app *tview.Application, session *discordgo.S
bottomBar := tview.NewFlex().SetDirection(tview.FlexColumn)
bottomBar.SetBackgroundColor(config.GetTheme().PrimitiveBackgroundColor)

loggedInAsText := fmt.Sprintf("Logged in as: '%s'", session.State.User.String())
loggedInAsText := fmt.Sprintf("Logged in as: '%s'", tviewutil.Escape(session.State.User.String()))
loggedInAs := tview.NewTextView().SetText(loggedInAsText)
loggedInAs.SetTextColor(config.GetTheme().PrimitiveBackgroundColor).SetBackgroundColor(config.GetTheme().PrimaryTextColor)
bottomBar.AddItem(loggedInAs, runewidth.StringWidth(loggedInAsText), 0, false)
Expand Down

0 comments on commit 755f269

Please sign in to comment.