chore(cleanup): add journal AI shortcut and align posts tmp_sort

This commit is contained in:
Scott Idem
2026-06-02 14:43:16 -04:00
parent 84a9d0fffc
commit 1de87b6c5f
6 changed files with 64 additions and 32 deletions

View File

@@ -73,14 +73,14 @@ let lq__post_comment_obj_li = $derived.by(() => {
return liveQuery(async () => {
if (!post_id) return [];
// .reverse() before .sortBy() is a Dexie no-op — reverse the array after instead.
// tmp_sort_1 here uses legacy encoding (priority=true→'1') designed for DESC order.
// tmp_sort_1 is built with build_tmp_sort() and is designed for ASC sort:
// priority=true -> '0', so priority records naturally sort first.
const comments = await db_posts.comment
.where('post_id')
.equals(post_id)
.limit(limit)
.sortBy('tmp_sort_1');
return comments.reverse();
return comments;
});
});