mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
ApplicationProvider: set initial category to pinned if pinned apps exist
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user