forked from cory/tildefriends
ssb: Use the cache of private messages we built for the unread notification to actually show private messages. Still needs some work, but it's something.
This commit is contained in:
@ -20,6 +20,7 @@ class TfElement extends LitElement {
|
||||
channels_latest: {type: Object},
|
||||
guest: {type: Boolean},
|
||||
url: {type: String},
|
||||
private_messages: {type: Array},
|
||||
};
|
||||
}
|
||||
|
||||
@ -334,7 +335,7 @@ class TfElement extends LitElement {
|
||||
JSON.stringify(cache)
|
||||
);
|
||||
}
|
||||
return cache.latest;
|
||||
return [cache.latest, cache.messages];
|
||||
}
|
||||
|
||||
async load_channels_latest(following) {
|
||||
@ -378,9 +379,11 @@ class TfElement extends LitElement {
|
||||
start_time = new Date();
|
||||
latest_private.then(function (latest) {
|
||||
self.channels_latest = Object.assign({}, self.channels_latest, {
|
||||
'🔐': latest,
|
||||
'🔐': latest[0],
|
||||
});
|
||||
console.log('private took', (new Date() - start_time) / 1000.0);
|
||||
console.log(latest);
|
||||
self.private_messages = latest[1];
|
||||
});
|
||||
}
|
||||
|
||||
@ -513,6 +516,7 @@ class TfElement extends LitElement {
|
||||
.channels_unread=${this.channels_unread}
|
||||
@channelsetunread=${this.channel_set_unread}
|
||||
.connections=${this.connections}
|
||||
.private_messages=${this.private_messages}
|
||||
></tf-tab-news>
|
||||
`;
|
||||
} else if (this.tab === 'connections') {
|
||||
|
Reference in New Issue
Block a user