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:
parent
b4e3b7e3a2
commit
2e7f242056
@ -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 -------------------- */
|
||||
|
Loading…
x
Reference in New Issue
Block a user