Skip to content

Commit

Permalink
Merge pull request #136 from technosf/development
Browse files Browse the repository at this point in the history
Changes ordering of HeaderBar update to get cleaner ico transition
  • Loading branch information
technosf authored Oct 13, 2024
2 parents 58f748e + dfa1dee commit f6cb437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build-aux
.flatpak-builder
code.sh
favicon.ico
tuner.code-workspace
3 changes: 2 additions & 1 deletion src/Widgets/HeaderBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f6cb437

Please sign in to comment.