Closed leolost2605 closed 1 year ago
Yeah that's definitely not how it should be. May I ask how you are testing this?
@leolost2605 I just remove the line app_list.add (app_entry);
(src/Permissions/PermissionsPlug.vala
line 90) and then it will show placeholder because the app_list
is empty.
If you're asking about this:
Add placeholder_stack.set_visible_child (placeholder);
in the end of construct
block
@leolost2605 I just remove the line
app_list.add (app_entry);
(src/Permissions/PermissionsPlug.vala
line 90) and then it will show placeholder because theapp_list
is empty.
Oh ok that makes sense then and is actually correct/IMO wanted behavior:
Whether the placeholder is shown with this PR is bound to the number of actual applications found by the AppManager
and not the number of visible children in app_list
. That's because otherwise it would be shown when searching for an app that isn't installed/not found because of a typo or whatever.
Currently nothing is shown when this is the case (it's done this way when searching for apps while adding a startup app too so i mimicked this behavior here). Maybe we should still show a placeholder like "No app matching $search_term was found"?
@leolost2605 makes sense, thanks for clarification!
I think such placeholder is a great idea! Please do it :)
@lenemter done. Also when the currently selected row gets hidden it now gets unselected.
What about using a Granite.Widgets.AlertView for the "No Flatpak apps installed" placeholder?
@lenemter done:
Works for me! Nice job :)
Fixes #146
Screenshot: