ssb: Be a bit more aggressive about loading latest messages. It bugs me when I don't see my own reactions in a channel or whatnot, and I think it has to do with the queried time ranges.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m2s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m2s
This commit is contained in:
parent
5b647e0937
commit
83e00763ea
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&dQu+yQ4/be0vcgIZSMKtesQCbH8lVhHcZAEv9+dNknY=.sha256"
|
"previous": "&wzVxQjLzBbwClkI3GB2t85i3pJxRcE1RnCXzC/TbfAw=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -437,10 +437,11 @@ class TfElement extends LitElement {
|
|||||||
(await tfrpc.rpc.databaseGet('unread')) ?? '{}'
|
(await tfrpc.rpc.databaseGet('unread')) ?? '{}'
|
||||||
);
|
);
|
||||||
this.following = Object.keys(following);
|
this.following = Object.keys(following);
|
||||||
|
let about_start_time = new Date();
|
||||||
users = await this.fetch_about(following, users);
|
users = await this.fetch_about(following, users);
|
||||||
console.log(
|
console.log(
|
||||||
'about took',
|
'about took',
|
||||||
(new Date() - start_time) / 1000.0,
|
(new Date() - about_start_time) / 1000.0,
|
||||||
'seconds for',
|
'seconds for',
|
||||||
Object.keys(users).length,
|
Object.keys(users).length,
|
||||||
'users'
|
'users'
|
||||||
|
@ -268,13 +268,13 @@ class TfTabNewsFeedElement extends LitElement {
|
|||||||
let messages = [];
|
let messages = [];
|
||||||
try {
|
try {
|
||||||
messages = await this.fetch_messages(
|
messages = await this.fetch_messages(
|
||||||
this.time_range[1] - 24 * 60 * 60 * 1000,
|
this.time_range[0],
|
||||||
end_time
|
end_time
|
||||||
);
|
);
|
||||||
messages = await this.decrypt(messages);
|
messages = await this.decrypt(messages);
|
||||||
this.update_time_range_from_messages(
|
this.update_time_range_from_messages(
|
||||||
messages.filter(
|
messages.filter(
|
||||||
(x) => x.timestamp >= this.time_range[1] && x.timestamp < end_time
|
(x) => x.timestamp >= this.time_range[0] && x.timestamp < end_time
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user