diff --git a/apps/ssb.json b/apps/ssb.json index 515f7e88..b21224f8 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&WEwYlCdGjQ76ULGr6G+6cYNaDmEgB32ml5Kv+04hTKE=.sha256" + "previous": "&BTakbuyvmD/t7rhYqYeRpMvqfajJaTKSccT+hAdtba8=.sha256" } diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js index a94e1168..5dd53808 100644 --- a/apps/ssb/tf-app.js +++ b/apps/ssb/tf-app.js @@ -167,13 +167,13 @@ class TfElement extends LitElement { if (ids.indexOf(id) == -1) { delete cache.about[id]; } else { - users[id] = Object.assign(users[id] || {}, cache.about[id]); + users[id] = Object.assign(cache.about[id], users[id] || {}); } } let ids_out_of_date = ids.filter( (x) => - !cache.about[x]?.seq || + (users[x]?.seq && !cache.about[x]?.seq) || (users[x]?.seq && users[x]?.seq > cache.about[x].seq) ); @@ -224,7 +224,7 @@ class TfElement extends LitElement { for (let id of ids_out_of_date) { if (!cache.about[id]?.seq) { - cache.about[id] = {seq: users[id]?.seq ?? 0}; + cache.about[id].seq = users[id]?.seq ?? 0; } }