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",
|
||||
"emoji": "🦀",
|
||||
"previous": "&InyKeZNpwCYY7BMR9wexMue8jzoMLxBv7moIY4QTBv0=.sha256"
|
||||
"previous": "&H3efrtk70fdGNCeZBNSgHppnec2D5iqTyqFH4lUK3XI=.sha256"
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ class TfElement extends LitElement {
|
||||
broadcasts: {type: Array},
|
||||
connections: {type: Array},
|
||||
loading: {type: Boolean},
|
||||
loading_about: {type: Number},
|
||||
loaded: {type: Boolean},
|
||||
following: {type: Array},
|
||||
users: {type: Object},
|
||||
@ -37,6 +38,7 @@ class TfElement extends LitElement {
|
||||
this.following = [];
|
||||
this.users = {};
|
||||
this.loaded = false;
|
||||
this.loading_about = 0;
|
||||
this.channels = [];
|
||||
this.channels_unread = {};
|
||||
this.channels_latest = {};
|
||||
@ -151,6 +153,7 @@ class TfElement extends LitElement {
|
||||
}
|
||||
|
||||
async fetch_about(following, users) {
|
||||
this.loading_about++;
|
||||
let ids = Object.keys(following).sort();
|
||||
const k_cache_version = 3;
|
||||
let cache = await tfrpc.rpc.databaseGet('about');
|
||||
@ -230,6 +233,8 @@ class TfElement extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
this.loading_about--;
|
||||
|
||||
let new_cache = JSON.stringify(cache);
|
||||
if (new_cache != original_cache) {
|
||||
let start_time = new Date();
|
||||
@ -545,7 +550,7 @@ class TfElement extends LitElement {
|
||||
whoami=${this.whoami}
|
||||
.users=${this.users}
|
||||
hash=${this.hash}
|
||||
?loading=${this.loading}
|
||||
?loading=${this.loading || this.loading_about != 0}
|
||||
.channels=${this.channels}
|
||||
.channels_latest=${this.channels_latest}
|
||||
.channels_unread=${this.channels_unread}
|
||||
|
Loading…
x
Reference in New Issue
Block a user