Skip to content

Commit 06479a7

Browse files
committed
Update placeholder with search changed, not filter
1 parent 1c50ff0 commit 06479a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/MainWindow.vala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
253253
playback_manager.current_audio = selected_audio;
254254
}
255255
});
256+
257+
search_bar.search_entry.search_changed.connect (() => {
258+
if (selection_model.n_items <= 0 && search_bar.search_entry.text != "") {
259+
search_placeholder.title = _("No Results for “%s").printf (search_bar.search_entry.text);
260+
}
261+
});
256262
}
257263

258264
public void start_search () {
@@ -339,7 +345,6 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
339345
}
340346

341347
if (search_bar.search_entry.text != "") {
342-
search_placeholder.title = _("No Results for “%s").printf (search_bar.search_entry.text);
343348
queue_stack.visible_child = search_placeholder;
344349
} else {
345350
queue_stack.visible_child = queue_placeholder;

0 commit comments

Comments
 (0)