forked from cory/tildefriends
Show placeholders for missing messages.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3760 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -239,7 +239,7 @@ async function getRelatedPostIds(db, message, ids, limit) {
|
||||
" json_extract(content, '$.type') = 'post' AND "+
|
||||
" (id = ? OR json_extract(content, '$.root') = ?) "+
|
||||
"ORDER BY timestamp DESC LIMIT ?",
|
||||
[].concat([message.timestamp, row_id_max], ids_batch, [message.id, id, limit]),
|
||||
[].concat([message.timestamp || 0, row_id_max], ids_batch, [message.id, id, limit]),
|
||||
function(row) {
|
||||
if (row.id) {
|
||||
recent.push({id: row.id, timestamp: row.timestamp});
|
||||
@@ -336,7 +336,8 @@ async function refresh(selected) {
|
||||
var ids;
|
||||
if (selected && selected.length == 1 && selected[0].startsWith('%')) {
|
||||
var m = await getPosts(db, selected);
|
||||
ids = m.length ? await getRelatedPostIds(db, m[0], all_followed, k_posts_max) : [];
|
||||
m = m.length ? m[0] : {id: selected[0]};
|
||||
ids = await getRelatedPostIds(db, m, all_followed, k_posts_max);
|
||||
} else {
|
||||
ids = await getRecentPostIds(db, whoami, g_selected, k_posts_max);
|
||||
}
|
||||
|
Reference in New Issue
Block a user