personal web client for Bluesky
typescript solidjs bluesky atcute

refactor: don't start from 0 ms for posts

mary.my.id 7d0aa3c3 2b408a4f

verified
Changed files
+5 -4
src
components
composer
lib
+5 -4
src/components/composer/lib/api.ts
··· 75 75 for (let idx = 0, len = state.posts.length; idx < len; idx++) { 76 76 log?.(`Processing`); 77 77 78 - // The sorting behavior for multiple posts sharing the same createdAt time is 79 - // undefined, so what we'll do here is increment the time by 1 for every post 80 - now.setMilliseconds(idx); 81 - 82 78 // Get the record key for this post 83 79 rkey = TID.now(); 84 80 ··· 159 155 root: reply ? reply.root : ref, 160 156 parent: ref, 161 157 }; 158 + 159 + // The sorting behavior for multiple posts sharing the same createdAt time 160 + // is undefined, so what we'll do here is increment the time by 1 ms 161 + // for every post 162 + now.setMilliseconds(now.getMilliseconds() + 1); 162 163 } 163 164 } 164 165