tootle-linux-client/src/API/Mention.vala

28 lines
606 B
Vala
Raw Normal View History

2020-08-01 17:40:56 +02:00
public class Tootle.API.Mention : Entity, Widgetizable {
2018-04-28 18:27:10 +02:00
2020-06-20 12:04:58 +02:00
public string id { get; construct set; }
2020-05-29 14:19:35 +02:00
public string username { get; construct set; }
public string acct { get; construct set; }
public string url { get; construct set; }
2020-09-05 10:02:42 +02:00
public string handle {
owned get {
return "@" + acct;
}
}
2020-06-20 12:04:58 +02:00
public Mention.from_account (API.Account account) {
2020-05-29 14:19:35 +02:00
Object (
id: account.id,
username: account.username,
acct: account.acct,
url: account.url
);
2018-04-28 18:27:10 +02:00
}
2019-03-11 15:14:37 +01:00
2020-08-01 17:40:56 +02:00
public override void open () {
Views.Profile.open_from_id (id);
}
2018-04-28 18:27:10 +02:00
}