chore(cleanup): add journal AI shortcut and align posts tmp_sort
This commit is contained in:
@@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user