diff --git a/src/AccountManager.vala b/src/AccountManager.vala index 9ca733e..d3f6c15 100644 --- a/src/AccountManager.vala +++ b/src/AccountManager.vala @@ -18,6 +18,11 @@ public class Tootle.AccountManager : Object{ file_path = "%s/%s".printf (dir_path, "accounts.json"); } + public void signal_current () { + switched (current); + updated (saved_accounts); + } + public void switch_account (int id){ debug ("Switching to account #%i", id); Tootle.settings.current_account = id; diff --git a/src/Application.vala b/src/Application.vala index 31070b0..488eddd 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -60,6 +60,7 @@ namespace Tootle{ window = new MainWindow (this); window.present (); accounts.switched (accounts.current); + accounts.signal_current (); } } } diff --git a/src/Views/FollowersView.vala b/src/Views/FollowersView.vala index 67f3b6c..cb5105a 100644 --- a/src/Views/FollowersView.vala +++ b/src/Views/FollowersView.vala @@ -6,7 +6,7 @@ public class Tootle.FollowersView : TimelineView { base (account.id.to_string ()); } - public new void prepend (ref Account account){ + public new void append (ref Account account){ if (empty != null) empty.destroy (); @@ -36,7 +36,7 @@ public class Tootle.FollowersView : TimelineView { var object = node.get_object (); if (object != null){ var status = Account.parse (object); - prepend (ref status); + append (ref status); } }); diff --git a/src/Views/TimelineView.vala b/src/Views/TimelineView.vala index 56737c7..a267e20 100644 --- a/src/Views/TimelineView.vala +++ b/src/Views/TimelineView.vala @@ -35,14 +35,18 @@ public class Tootle.TimelineView : AbstractView { if (timeline != this.timeline) return; - prepend (ref status, true); + prepend (ref status); } public virtual bool is_status_owned (ref Status status) { return status.is_owned (); } - public void prepend (ref Status status, bool first = false){ + public void prepend (ref Status status) { + append (ref status, true); + } + + public void append (ref Status status, bool first = false){ if (empty != null) empty.destroy (); @@ -109,7 +113,7 @@ public class Tootle.TimelineView : AbstractView { var object = node.get_object (); if (object != null){ var status = Status.parse(object); - prepend (ref status); + append (ref status); } }); get_pages (mess.response_headers.get_one ("Link"));