ssb: Speculation on why I sometimes don't see names update.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m0s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m0s
This commit is contained in:
parent
e3fcdea362
commit
f979ff7050
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🦀",
|
||||
"previous": "&xtu0KJ63/WsxuSXqYV68rs2rPJeJJjAQ3GKXy/SGHhA=.sha256"
|
||||
"previous": "&vqEnKoL61nS6/nfbezpmZP2KaIgsvAtQHb/DkkyxCR4=.sha256"
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ class TfElement extends LitElement {
|
||||
|
||||
async fetch_about(following, users) {
|
||||
let ids = Object.keys(following).sort();
|
||||
const k_cache_version = 2;
|
||||
const k_cache_version = 3;
|
||||
let cache = await tfrpc.rpc.databaseGet('about');
|
||||
let original_cache = cache;
|
||||
cache = cache ? JSON.parse(cache) : {};
|
||||
@ -163,6 +163,12 @@ class TfElement extends LitElement {
|
||||
};
|
||||
}
|
||||
|
||||
let ids_out_of_date = ids.filter(
|
||||
(x) =>
|
||||
(users[x]?.seq && !cache.about[x]?.seq) ||
|
||||
(users[x]?.seq && users[x]?.seq > cache.about[x].seq)
|
||||
);
|
||||
|
||||
for (let id of Object.keys(cache.about)) {
|
||||
if (ids.indexOf(id) == -1) {
|
||||
delete cache.about[id];
|
||||
@ -171,12 +177,6 @@ class TfElement extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
let ids_out_of_date = ids.filter(
|
||||
(x) =>
|
||||
(users[x]?.seq && !cache.about[x]?.seq) ||
|
||||
(users[x]?.seq && users[x]?.seq > cache.about[x].seq)
|
||||
);
|
||||
|
||||
console.log(
|
||||
'loading about for',
|
||||
ids.length,
|
||||
|
Loading…
x
Reference in New Issue
Block a user