Skip to content

Commit

Permalink
Fix #74: Update sidebar icon
Browse files Browse the repository at this point in the history
Listen to source connection_status changes
  • Loading branch information
marbetschar committed Mar 30, 2021
1 parent 33b67a6 commit 1ed23ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow {
lock (source_rows) {
source_rows.foreach (source_row => {
source_row.key.set_connection_status (E.SourceConnectionStatus.CONNECTING);
source_row.value.update_request ();

Tasks.Application.model.refresh_task_list.begin (source_row.key, null, (obj, res) => {
try {
Expand All @@ -342,7 +341,6 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow {
source_row.key.set_connection_status (E.SourceConnectionStatus.DISCONNECTED);
dialog_refresh_task_list_error (e, source_row.key, registry);
}
source_row.value.update_request ();
});
return true;
});
Expand Down
2 changes: 2 additions & 0 deletions src/Widgets/SourceRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class Tasks.SourceRow : Gtk.ListBoxRow {

add (revealer);

source.notify["connection-status"].connect (update_request);

update_request ();
}

Expand Down

0 comments on commit 1ed23ce

Please sign in to comment.