1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

HIBP module now wraps error text if an error occurrs

This commit is contained in:
Chris Cummer 2019-07-09 13:00:41 -07:00
parent b4e3b7e3a2
commit 2e7f242056

View File

@ -51,14 +51,18 @@ func (widget *Widget) Refresh() {
title := widget.CommonSettings().Title
title = title + widget.sinceDateForTitle()
var wrap bool
var content string
if err != nil {
wrap = true
content = err.Error()
} else {
wrap = false
content = widget.contentFrom(data)
}
widget.Redraw(title, content, false)
widget.Redraw(title, content, wrap)
}
/* -------------------- Unexported Functions -------------------- */