mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Convert the bulk of modules over to RedrawFunc
This commit is contained in:
@@ -72,15 +72,14 @@ func (widget *Widget) HelpText() string {
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if widget.messages == nil {
|
||||
return
|
||||
}
|
||||
|
||||
widget.RedrawFunc(widget.content)
|
||||
}
|
||||
|
||||
func (widget *Widget) content() (string, string, bool) {
|
||||
title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.settings.roomURI)
|
||||
if widget.messages == nil || len(widget.messages) == 0 {
|
||||
return title, "No Messages To Display", false
|
||||
}
|
||||
var str string
|
||||
for idx, message := range widget.messages {
|
||||
row := fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user