simplify init of searchdialog

This commit is contained in:
Drew Weymouth
2024-05-24 07:53:34 -07:00
parent 3c5d1d521b
commit 448421e556
3 changed files with 42 additions and 76 deletions
+2 -12
View File
@@ -14,18 +14,8 @@ type QuickSearch struct {
}
func NewQuickSearch(mp mediaprovider.MediaProvider, im util.ImageFetcher) *QuickSearch {
q := &QuickSearch{
mp: mp,
}
sd := NewSearchDialog(
im,
"Quick Search",
q.onSearched,
nil,
)
q.SearchDialog = sd
q := &QuickSearch{mp: mp}
q.SearchDialog = NewSearchDialog(im, "Quick Search", "Close", q.onSearched)
return q
}