1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

notifications: try to prevent zombies better, markdown, re-org

This commit is contained in:
bbedward
2025-07-26 16:08:58 -04:00
parent 484a947127
commit 01a94a17de
22 changed files with 684 additions and 350 deletions

View File

@@ -260,8 +260,8 @@ PanelWindow {
function onIsVisibleChanged() {
if (appDrawerPopout.isVisible)
Qt.callLater(function() {
searchField.forceActiveFocus();
});
searchField.forceActiveFocus();
});
else
searchField.clearFocus();
}

View File

@@ -36,6 +36,8 @@ Item {
property var appUsageRanking: Prefs.appUsageRanking
// Internal model
property alias model: filteredModel
// Watch AppSearchService.applications changes via property binding
property var _watchApplications: AppSearchService.applications
// Signals
signal appLaunched(var app)
@@ -81,21 +83,21 @@ Item {
var aUsage = appUsageRanking[aId] ? appUsageRanking[aId].usageCount : 0;
var bUsage = appUsageRanking[bId] ? appUsageRanking[bId].usageCount : 0;
if (aUsage !== bUsage)
return bUsage - aUsage; // Higher usage first
return bUsage - aUsage;
// Higher usage first
return (a.name || "").localeCompare(b.name || ""); // Alphabetical fallback
});
// Convert to model format and populate
apps.forEach((app) => {
if (app)
filteredModel.append({
"name": app.name || "",
"exec": app.execString || "",
"icon": app.icon || "application-x-executable",
"comment": app.comment || "",
"categories": app.categories || [],
"desktopEntry": app
});
"name": app.name || "",
"exec": app.execString || "",
"icon": app.icon || "application-x-executable",
"comment": app.comment || "",
"categories": app.categories || [],
"desktopEntry": app
});
});
}
@@ -178,11 +180,7 @@ Item {
}
onSelectedCategoryChanged: updateFilteredModel()
onAppUsageRankingChanged: updateFilteredModel()
// Watch AppSearchService.applications changes via property binding
property var _watchApplications: AppSearchService.applications
on_WatchApplicationsChanged: updateFilteredModel()
// Initialize
Component.onCompleted: {
updateFilteredModel();