From dfa1dee05fb01c19091a3552216f0e9b34969699 Mon Sep 17 00:00:00 2001 From: technosf <535060+technosf@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:22:57 -0700 Subject: [PATCH] Changes ordering of HeaderBar update to get cleaner ico transition --- .gitignore | 1 + src/Widgets/HeaderBar.vala | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4811f38..06d16bb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build-aux .flatpak-builder code.sh favicon.ico +tuner.code-workspace diff --git a/src/Widgets/HeaderBar.vala b/src/Widgets/HeaderBar.vala index 1c36309..32341e3 100644 --- a/src/Widgets/HeaderBar.vala +++ b/src/Widgets/HeaderBar.vala @@ -190,13 +190,13 @@ public class Tuner.HeaderBar : Gtk.HeaderBar { if (_station != null) { _station.notify.disconnect (handle_station_change); } + load_favicon (station); // Kick off first as its async and long running in comparison _station = station; _station.notify.connect ( (sender, property) => { handle_station_change (); }); title = station.title; subtitle = _("Playing"); - load_favicon (station); starred = station.starred; } @@ -268,6 +268,7 @@ public class Tuner.HeaderBar : Gtk.HeaderBar { */ private void load_favicon(Model.Station station) { + this.favicon.clear (); Favicon.load_async.begin (station, true, (favicon, res) => { var pxbuf = Favicon.load_async.end (res); if (pxbuf != null) {