Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/Services/Todoist.vala
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ public class Services.Todoist : GLib.Object {
yield queue (source);
}
} catch (Error e) {
debug ("Failed to sync: "+e.message);
source.sync_failed();
debug ("Failed to sync: " + e.message);
source.sync_failed ();
}

source.last_sync = new GLib.DateTime.now_local ().to_string ();
Expand Down
12 changes: 8 additions & 4 deletions src/Widgets/SyncButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ public class Widgets.SyncButton : Adw.Bin {
css_classes = { "flat", "header-item-button", "dim-label" }
};

var error_image = new Gtk.Image () {
gicon = new ThemedIcon ("dialog-warning-symbolic"),
pixel_size = 13
var error_button = new Gtk.Button.from_icon_name ("dialog-warning-symbolic") {
valign = Gtk.Align.CENTER,
css_classes = { "flat", "header-item-button", "dim-label" }
};

stack = new Gtk.Stack () {
transition_type = Gtk.StackTransitionType.CROSSFADE
};

stack.add_named (sync_button, "sync");
stack.add_named (error_image, "error");
stack.add_named (error_button, "error");

main_revealer = new Gtk.Revealer () {
transition_type = Gtk.RevealerTransitionType.CROSSFADE,
Expand All @@ -64,6 +64,10 @@ public class Widgets.SyncButton : Adw.Bin {
sync_button.clicked.connect (() => {
clicked ();
});

error_button.clicked.connect (() => {
clicked ();
});
}

public void sync_started () {
Expand Down
Loading