forked from cory/tildefriends
ssb: Speculation on why I sometimes don't see names update.
This commit is contained in:
parent
e3fcdea362
commit
f979ff7050
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&xtu0KJ63/WsxuSXqYV68rs2rPJeJJjAQ3GKXy/SGHhA=.sha256"
|
"previous": "&vqEnKoL61nS6/nfbezpmZP2KaIgsvAtQHb/DkkyxCR4=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ class TfElement extends LitElement {
|
|||||||
|
|
||||||
async fetch_about(following, users) {
|
async fetch_about(following, users) {
|
||||||
let ids = Object.keys(following).sort();
|
let ids = Object.keys(following).sort();
|
||||||
const k_cache_version = 2;
|
const k_cache_version = 3;
|
||||||
let cache = await tfrpc.rpc.databaseGet('about');
|
let cache = await tfrpc.rpc.databaseGet('about');
|
||||||
let original_cache = cache;
|
let original_cache = cache;
|
||||||
cache = cache ? JSON.parse(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)) {
|
for (let id of Object.keys(cache.about)) {
|
||||||
if (ids.indexOf(id) == -1) {
|
if (ids.indexOf(id) == -1) {
|
||||||
delete cache.about[id];
|
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(
|
console.log(
|
||||||
'loading about for',
|
'loading about for',
|
||||||
ids.length,
|
ids.length,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user