ssb: Don't forget the about info we know as we reload.
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 4m53s

This commit is contained in:
Cory McWilliams 2025-05-09 07:35:52 -04:00
parent 3eff1b08a9
commit 0dc148bfea
2 changed files with 20 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&3J6eTdwcXbt841IXTSh4plSLiHY1+n+iXNRuT76MfQs=.sha256"
"previous": "&NajVQD/6DKISEDlnyAVYh3NPO/vxMN7ksNZy3FwI378=.sha256"
}

View File

@ -363,8 +363,13 @@ class TfElement extends LitElement {
[JSON.stringify(Object.keys(users))]
);
for (let row of info) {
users[row.author].seq = row.max_seq;
users[row.author].ts = row.max_ts;
users[row.author] = Object.assign(
{
seq: row.max_seq,
ts: row.max_ts,
},
users[row.author]
);
}
return users;
}
@ -390,16 +395,20 @@ class TfElement extends LitElement {
let start_time = new Date();
let whoami = this.whoami;
let following = await tfrpc.rpc.following([whoami], 2);
let old_users = this.users ?? {};
let users = {};
let by_count = [];
for (let [id, v] of Object.entries(following)) {
users[id] = {
following: v.of,
blocking: v.ob,
followed: v.if,
blocked: v.ib,
follow_depth: following[id]?.d,
};
users[id] = Object.assign(
{
following: v.of,
blocking: v.ob,
followed: v.if,
blocked: v.ib,
follow_depth: following[id]?.d,
},
old_users[id]
);
by_count.push({count: v.of, id: id});
}
let reactions = this.load_recent_reactions();
@ -419,7 +428,7 @@ class TfElement extends LitElement {
this.users = users;
let self = this;
this.fetch_about(following, users).then(function(result) {
this.fetch_about(following, users).then(function (result) {
self.users = result;
console.log(
'about took',