mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Cleanup git widget
Next/Prev already implemented properly in multisourcewidget
This commit is contained in:
parent
cbb147f41e
commit
d410f548b8
@ -216,25 +216,3 @@ func (widget *Widget) findGitRepositories(repositories []*GitRepo, directory str
|
||||
|
||||
return repositories
|
||||
}
|
||||
|
||||
func (widget *Widget) Next() {
|
||||
widget.Idx = widget.Idx + 1
|
||||
if widget.Idx == len(widget.GitRepos) {
|
||||
widget.Idx = 0
|
||||
}
|
||||
|
||||
if widget.DisplayFunction != nil {
|
||||
widget.DisplayFunction()
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) Prev() {
|
||||
widget.Idx = widget.Idx - 1
|
||||
if widget.Idx < 0 {
|
||||
widget.Idx = len(widget.GitRepos) - 1
|
||||
}
|
||||
|
||||
if widget.DisplayFunction != nil {
|
||||
widget.DisplayFunction()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user