Skip to content

Commit

Permalink
Don't show hidden icons in launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 16, 2021
1 parent 53742b3 commit 7ce01ed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/ui/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ func (l *picker) updateAppListMatching(input string) {

func (l *picker) appButtonListMatching(input string) []fyne.CanvasObject {
var appList []fyne.CanvasObject
var iconList = []fynedesk.AppData{}

dataRange := l.desk.IconProvider().FindAppsMatching(input)
for _, data := range dataRange {
if data == nil || data.Hidden() {
continue
}
appData := data // capture for goroutine below
app := widget.NewButtonWithIcon(appData.Name(), wmTheme.BrokenImageIcon, func() {
l.callback(appData)
Expand All @@ -87,8 +91,9 @@ func (l *picker) appButtonListMatching(input string) []fyne.CanvasObject {
app.Alignment = widget.ButtonAlignLeading

appList = append(appList, app)
iconList = append(iconList, data)
}
go l.loadIcons(dataRange, appList)
go l.loadIcons(iconList, appList)

appList = append(appList, l.loadSuggestionsMatching(input)...)
if len(appList) > 0 {
Expand Down

0 comments on commit 7ce01ed

Please sign in to comment.