diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-09-07 16:00:03 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-09-07 16:00:03 +0000 |
| commit | d623abd20c070b7736f66793b8f921a0ad7cb27f (patch) | |
| tree | b8f2b3ea8b77f04ecae59a6aee40379003493bb1 /packages/trpc/models | |
| parent | 8e95dae31a2c88d931917129b690698e0490bb04 (diff) | |
| download | karakeep-d623abd20c070b7736f66793b8f921a0ad7cb27f.tar.zst | |
fix: fix tag flicker caused by tag sorting
Diffstat (limited to 'packages/trpc/models')
| -rw-r--r-- | packages/trpc/models/bookmarks.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/trpc/models/bookmarks.ts b/packages/trpc/models/bookmarks.ts index 07b3832d..e0864ec1 100644 --- a/packages/trpc/models/bookmarks.ts +++ b/packages/trpc/models/bookmarks.ts @@ -342,6 +342,12 @@ export class Bookmark implements PrivacyAware { } }); + bookmarksArr.forEach((b) => { + b.tags.sort((a, b) => + a.attachedBy === "ai" ? 1 : b.attachedBy === "ai" ? -1 : 0, + ); + }); + let nextCursor = null; if (bookmarksArr.length > input.limit) { const nextItem = bookmarksArr.pop()!; |
