Hooks: make hook activate after settings are updated
This commit is contained in:
parent
fe6ecf7daf
commit
46bc8939b4
2 changed files with 7 additions and 7 deletions
|
|
@ -37,8 +37,8 @@ Item {
|
||||||
|
|
||||||
if (!query || query.trim() === "") {
|
if (!query || query.trim() === "") {
|
||||||
// Return all apps alphabetically
|
// Return all apps alphabetically
|
||||||
return entries.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()))
|
return entries.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())).map(
|
||||||
.map(app => createResultEntry(app))
|
app => createResultEntry(app))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use fuzzy search if available, fallback to simple search
|
// Use fuzzy search if available, fallback to simple search
|
||||||
|
|
|
||||||
|
|
@ -256,11 +256,6 @@ Singleton {
|
||||||
// Update cache directly
|
// Update cache directly
|
||||||
currentWallpapers[screenName] = path
|
currentWallpapers[screenName] = path
|
||||||
|
|
||||||
// Execute wallpaper change hook
|
|
||||||
if (HooksService) {
|
|
||||||
HooksService.executeWallpaperHook(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Settings - still need immutable update for Settings persistence
|
// Update Settings - still need immutable update for Settings persistence
|
||||||
// The slice() ensures Settings detects the change and saves properly
|
// The slice() ensures Settings detects the change and saves properly
|
||||||
var monitors = Settings.data.wallpaper.monitors || []
|
var monitors = Settings.data.wallpaper.monitors || []
|
||||||
|
|
@ -291,6 +286,11 @@ Singleton {
|
||||||
// Emit signal for this specific wallpaper change
|
// Emit signal for this specific wallpaper change
|
||||||
root.wallpaperChanged(screenName, path)
|
root.wallpaperChanged(screenName, path)
|
||||||
|
|
||||||
|
// Execute wallpaper change hook after the change is complete
|
||||||
|
if (HooksService) {
|
||||||
|
HooksService.executeWallpaperHook(path)
|
||||||
|
}
|
||||||
|
|
||||||
// Restart the random wallpaper timer
|
// Restart the random wallpaper timer
|
||||||
if (randomWallpaperTimer.running) {
|
if (randomWallpaperTimer.running) {
|
||||||
randomWallpaperTimer.restart()
|
randomWallpaperTimer.restart()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue