Skip to content

Commit de8cbf3

Browse files
committed
fix(launcher): Remove list children if update is empty
1 parent 9960a8e commit de8cbf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/launcher.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,17 @@ export class Launcher extends search.Search {
104104
this.close()
105105
} else if ("Update" in response) {
106106
this.clear()
107+
107108
if (this.append_id !== null) {
108109
GLib.source_remove(this.append_id)
109110
this.append_id = null
110111
}
111112

113+
if (response.Update.length === 0) {
114+
this.cleanup()
115+
return;
116+
}
117+
112118
this.append_id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
113119
const item = response.Update.shift()
114120
if (item) {

0 commit comments

Comments
 (0)