ApplicationProvider: set initial category to pinned if pinned apps exist

This commit is contained in:
Lysec
2026-01-24 22:50:22 +01:00
parent 37c5681a5e
commit c559b75c4e
@@ -97,8 +97,12 @@ Item {
function onOpened() {
// Refresh apps when launcher opens
loadApplications();
// Reset to "all" category when opening
selectedCategory = "all";
// Default to Pinned if there are pinned apps, otherwise all
if (availableCategories.includes("Pinned")) {
selectedCategory = "Pinned";
} else {
selectedCategory = "all";
}
// Set category mode initially (will be updated when getResults is called)
showsCategories = true;
}
@@ -297,13 +301,15 @@ Item {
}
}
const result = ["all"];
const result = [];
// Add Pinned category first if there are pinned apps
if (hasPinned) {
result.push("Pinned");
}
result.push("all");
if (hasAudioVideo) {
categorySet.add("AudioVideo");
}