1
0
mirror of https://gitlab.gnome.org/World/tootle synced 2024-12-11 16:15:33 +01:00

Rename prepend functions

This commit is contained in:
bleakgrey 2018-05-27 20:14:48 +03:00
parent 4207d8bebe
commit 661c7a9a41
4 changed files with 15 additions and 5 deletions

View File

@ -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;

View File

@ -60,6 +60,7 @@ namespace Tootle{
window = new MainWindow (this);
window.present ();
accounts.switched (accounts.current);
accounts.signal_current ();
}
}
}

View File

@ -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);
}
});

View File

@ -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"));