Browse Source

perf(messages_list): optimize color conversion by eliminating string allocation

ayn2op 4 tháng trước cách đây
mục cha
commit
0f8d561a23
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      cmd/messages_list.go

+ 1 - 1
cmd/messages_list.go

@@ -159,7 +159,7 @@ func (ml *messagesList) drawAuthor(w io.Writer, message discord.Message) {
 				return r
 			})
 			if ok {
-				foreground = tcell.GetColor(color.String())
+				foreground = tcell.NewHexColor(int32(color))
 			}
 		}
 	}