[gnome-music/wip/mschraal/albumwidget-show-duration-label: 1/2] albumwidget: Make sure year/duration are shown




commit 2968e69adea2a73aceeafb0a7bd052450067a6a2
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Feb 20 21:58:03 2022 +0100

    albumwidget: Make sure year/duration are shown
    
    If the duration was no longer updated (after loading was done), it would
    not set the year & duration labels.
    
    Make sure the labels are set staticly at least once.
    
    Fixes: #506

 gnomemusic/widgets/albumwidget.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 6b2fb78ba..f3701dfbf 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -153,6 +153,9 @@ class AlbumWidget(Adw.Bin):
         self._year_signal_id = self._corealbum.connect(
             "notify::year", self._on_release_info_changed)
         self._set_composer_label()
+        # In case the duration is no longer changing, make sure it is
+        # displayed.
+        self._corealbum.notify("duration")
 
         self._album_model = self._corealbum.props.model
         self._model_signal_id = self._album_model.connect_after(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]