forked from cory/tildefriends
ssb: Suppress the 'set your profile' banner if we're still loading abouts.
This commit is contained in:
parent
08c097e176
commit
996f9abaa2
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&InyKeZNpwCYY7BMR9wexMue8jzoMLxBv7moIY4QTBv0=.sha256"
|
"previous": "&H3efrtk70fdGNCeZBNSgHppnec2D5iqTyqFH4lUK3XI=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ class TfElement extends LitElement {
|
|||||||
broadcasts: {type: Array},
|
broadcasts: {type: Array},
|
||||||
connections: {type: Array},
|
connections: {type: Array},
|
||||||
loading: {type: Boolean},
|
loading: {type: Boolean},
|
||||||
|
loading_about: {type: Number},
|
||||||
loaded: {type: Boolean},
|
loaded: {type: Boolean},
|
||||||
following: {type: Array},
|
following: {type: Array},
|
||||||
users: {type: Object},
|
users: {type: Object},
|
||||||
@ -37,6 +38,7 @@ class TfElement extends LitElement {
|
|||||||
this.following = [];
|
this.following = [];
|
||||||
this.users = {};
|
this.users = {};
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
|
this.loading_about = 0;
|
||||||
this.channels = [];
|
this.channels = [];
|
||||||
this.channels_unread = {};
|
this.channels_unread = {};
|
||||||
this.channels_latest = {};
|
this.channels_latest = {};
|
||||||
@ -151,6 +153,7 @@ class TfElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetch_about(following, users) {
|
async fetch_about(following, users) {
|
||||||
|
this.loading_about++;
|
||||||
let ids = Object.keys(following).sort();
|
let ids = Object.keys(following).sort();
|
||||||
const k_cache_version = 3;
|
const k_cache_version = 3;
|
||||||
let cache = await tfrpc.rpc.databaseGet('about');
|
let cache = await tfrpc.rpc.databaseGet('about');
|
||||||
@ -230,6 +233,8 @@ class TfElement extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.loading_about--;
|
||||||
|
|
||||||
let new_cache = JSON.stringify(cache);
|
let new_cache = JSON.stringify(cache);
|
||||||
if (new_cache != original_cache) {
|
if (new_cache != original_cache) {
|
||||||
let start_time = new Date();
|
let start_time = new Date();
|
||||||
@ -545,7 +550,7 @@ class TfElement extends LitElement {
|
|||||||
whoami=${this.whoami}
|
whoami=${this.whoami}
|
||||||
.users=${this.users}
|
.users=${this.users}
|
||||||
hash=${this.hash}
|
hash=${this.hash}
|
||||||
?loading=${this.loading}
|
?loading=${this.loading || this.loading_about != 0}
|
||||||
.channels=${this.channels}
|
.channels=${this.channels}
|
||||||
.channels_latest=${this.channels_latest}
|
.channels_latest=${this.channels_latest}
|
||||||
.channels_unread=${this.channels_unread}
|
.channels_unread=${this.channels_unread}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user