Reworked some following math.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4601 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-11-03 00:45:30 +00:00
parent 8fe7adc50e
commit 4cedc54d2d
6 changed files with 143 additions and 33 deletions

View File

@ -212,9 +212,18 @@ class TfElement extends LitElement {
let whoami = this.whoami;
let tags = this.load_recent_tags();
let following = await tfrpc.rpc.following([whoami], 2);
console.log(following);
let users = {};
users = await this.fetch_about(following.sort(), users);
this.following = following;
for (let [id, v] of Object.entries(following)) {
users[id] = {
following: v.of,
blocking: v.ob,
followed: v.if,
blocked: v.ib,
};
}
users = await this.fetch_about(Object.keys(following).sort(), users);
this.following = Object.keys(following);
this.users = users;
await tags;
console.log(`load finished ${whoami} => ${this.whoami}`);