edits
This commit is contained in:
+21
-21
@@ -1,32 +1,32 @@
|
||||
import Quickshell.Io
|
||||
|
||||
Process {
|
||||
id: getGifsProcess
|
||||
required property string gifFolder
|
||||
property list<string> gifsList: []
|
||||
id: getGifsProcess
|
||||
required property string gifFolder
|
||||
property list<string> gifsList: []
|
||||
|
||||
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
|
||||
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
var gifs = this.text.trim().split("\n")
|
||||
if (gifs.length > 0 && gifs[0] !== "") {
|
||||
getGifsProcess.gifsList = gifs
|
||||
} else {
|
||||
getGifsProcess.gifsList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
var gifs = this.text.trim().split("\n")
|
||||
if (gifs.length > 0 && gifs[0] !== "") {
|
||||
getGifsProcess.gifsList = gifs
|
||||
} else {
|
||||
getGifsProcess.gifsList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reload() {
|
||||
gifsList = []
|
||||
running = false
|
||||
running = true
|
||||
}
|
||||
function reload() {
|
||||
gifsList = []
|
||||
running = false
|
||||
running = true
|
||||
}
|
||||
|
||||
onGifFolderChanged: {
|
||||
onGifFolderChanged: {
|
||||
if (running) {
|
||||
reload()
|
||||
getGifsProcess.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user