Allow setting widget title URL
This commit is contained in:
parent
4dbb5975c0
commit
514cf2b81c
8 changed files with 36 additions and 5 deletions
|
|
@ -24,6 +24,12 @@ type Lobsters struct {
|
|||
func (widget *Lobsters) Initialize() error {
|
||||
widget.withTitle("Lobsters").withCacheDuration(time.Hour)
|
||||
|
||||
if widget.InstanceURL == "" {
|
||||
widget.withTitleURL("https://lobste.rs")
|
||||
} else {
|
||||
widget.withTitleURL(widget.InstanceURL)
|
||||
}
|
||||
|
||||
if widget.SortBy == "" || (widget.SortBy != "hot" && widget.SortBy != "new") {
|
||||
widget.SortBy = "hot"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue