forked from cory/tildefriends
ssb: Don't forget the about info we know as we reload.
This commit is contained in:
parent
3eff1b08a9
commit
0dc148bfea
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&3J6eTdwcXbt841IXTSh4plSLiHY1+n+iXNRuT76MfQs=.sha256"
|
"previous": "&NajVQD/6DKISEDlnyAVYh3NPO/vxMN7ksNZy3FwI378=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -363,8 +363,13 @@ class TfElement extends LitElement {
|
|||||||
[JSON.stringify(Object.keys(users))]
|
[JSON.stringify(Object.keys(users))]
|
||||||
);
|
);
|
||||||
for (let row of info) {
|
for (let row of info) {
|
||||||
users[row.author].seq = row.max_seq;
|
users[row.author] = Object.assign(
|
||||||
users[row.author].ts = row.max_ts;
|
{
|
||||||
|
seq: row.max_seq,
|
||||||
|
ts: row.max_ts,
|
||||||
|
},
|
||||||
|
users[row.author]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
@ -390,16 +395,20 @@ class TfElement extends LitElement {
|
|||||||
let start_time = new Date();
|
let start_time = new Date();
|
||||||
let whoami = this.whoami;
|
let whoami = this.whoami;
|
||||||
let following = await tfrpc.rpc.following([whoami], 2);
|
let following = await tfrpc.rpc.following([whoami], 2);
|
||||||
|
let old_users = this.users ?? {};
|
||||||
let users = {};
|
let users = {};
|
||||||
let by_count = [];
|
let by_count = [];
|
||||||
for (let [id, v] of Object.entries(following)) {
|
for (let [id, v] of Object.entries(following)) {
|
||||||
users[id] = {
|
users[id] = Object.assign(
|
||||||
|
{
|
||||||
following: v.of,
|
following: v.of,
|
||||||
blocking: v.ob,
|
blocking: v.ob,
|
||||||
followed: v.if,
|
followed: v.if,
|
||||||
blocked: v.ib,
|
blocked: v.ib,
|
||||||
follow_depth: following[id]?.d,
|
follow_depth: following[id]?.d,
|
||||||
};
|
},
|
||||||
|
old_users[id]
|
||||||
|
);
|
||||||
by_count.push({count: v.of, id: id});
|
by_count.push({count: v.of, id: id});
|
||||||
}
|
}
|
||||||
let reactions = this.load_recent_reactions();
|
let reactions = this.load_recent_reactions();
|
||||||
@ -419,7 +428,7 @@ class TfElement extends LitElement {
|
|||||||
this.users = users;
|
this.users = users;
|
||||||
|
|
||||||
let self = this;
|
let self = this;
|
||||||
this.fetch_about(following, users).then(function(result) {
|
this.fetch_about(following, users).then(function (result) {
|
||||||
self.users = result;
|
self.users = result;
|
||||||
console.log(
|
console.log(
|
||||||
'about took',
|
'about took',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user