fixed race condition on profile change

This commit is contained in:
Martin Wagner 2020-08-13 17:01:46 +02:00
parent 0be454a8d7
commit 8ba053921e

View File

@ -1553,7 +1553,7 @@ class AlbumIconView(Gtk.IconView):
def populate(self, artists):
self.stop_flag=False
# prepare albmus list
self.store.clear()
GLib.idle_add(self.store.clear)
if len(artists) > 1:
self.set_markup_column(2)
else:
@ -1822,6 +1822,7 @@ class Browser(Gtk.Paned):
return self.search.started()
def back_to_album(self, *args): # TODO
def callback():
try: # since this can still be running when the connection is lost, various exceptions can occur
song=ClientHelper.song_to_first_str_dict(self.client.wrapped_call("currentsong"))
try:
@ -1854,6 +1855,7 @@ class Browser(Gtk.Paned):
self.album_view.scroll_to_selected_album()
except:
pass
GLib.idle_add(callback)
def on_search_toggled(self, widget):
if widget.get_active():