mirror of
https://gitlab.gnome.org/World/tootle
synced 2025-02-17 03:51:11 +01:00
Support custom account fields
This commit is contained in:
parent
560ae523a8
commit
fbdfb5ea27
@ -40,6 +40,17 @@ public class Tootle.Account{
|
||||
account.following_count = obj.get_int_member ("following_count");
|
||||
account.statuses_count = obj.get_int_member ("statuses_count");
|
||||
|
||||
if (obj.has_member ("fields")) {
|
||||
obj.get_array_member ("fields").foreach_element ((array, i, node) => {
|
||||
var field_obj = node.get_object ();
|
||||
var field_name = field_obj.get_string_member ("name");
|
||||
var field_val = field_obj.get_string_member ("value");
|
||||
account.note += "\n";
|
||||
account.note += field_name + ": ";
|
||||
account.note += field_val;
|
||||
});
|
||||
}
|
||||
|
||||
return account;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user