Wallpaper: fixed random wallpaper
This commit is contained in:
parent
5b8d7dbff5
commit
f679999453
1 changed files with 2 additions and 4 deletions
|
|
@ -152,7 +152,7 @@ Singleton {
|
||||||
Logger.log("Wallpaper", "setRandomWallpaper")
|
Logger.log("Wallpaper", "setRandomWallpaper")
|
||||||
for (var i = 0; i < Quickshell.screens.length; i++) {
|
for (var i = 0; i < Quickshell.screens.length; i++) {
|
||||||
var screenName = Quickshell.screens[i].name
|
var screenName = Quickshell.screens[i].name
|
||||||
var wallpaperList = getWallpaperList(screenName)
|
var wallpaperList = getWallpapersList(screenName)
|
||||||
|
|
||||||
if (wallpaperList.length > 0) {
|
if (wallpaperList.length > 0) {
|
||||||
var randomIndex = Math.floor(Math.random() * wallpaperList.length)
|
var randomIndex = Math.floor(Math.random() * wallpaperList.length)
|
||||||
|
|
@ -234,15 +234,13 @@ Singleton {
|
||||||
var lists = root.wallpaperLists
|
var lists = root.wallpaperLists
|
||||||
lists[screenName] = []
|
lists[screenName] = []
|
||||||
root.wallpaperLists = lists
|
root.wallpaperLists = lists
|
||||||
}
|
} else if (status === FolderListModel.Loading) {
|
||||||
else if (status === FolderListModel.Loading) {
|
|
||||||
// Flush the list
|
// Flush the list
|
||||||
var lists = root.wallpaperLists
|
var lists = root.wallpaperLists
|
||||||
lists[screenName] = []
|
lists[screenName] = []
|
||||||
root.wallpaperLists = lists
|
root.wallpaperLists = lists
|
||||||
|
|
||||||
scanningCount++
|
scanningCount++
|
||||||
|
|
||||||
} else if (status === FolderListModel.Ready) {
|
} else if (status === FolderListModel.Ready) {
|
||||||
var files = []
|
var files = []
|
||||||
for (var i = 0; i < count; i++) {
|
for (var i = 0; i < count; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue