···1010 import {
1111 parseCanonicalResourceUri,
1212 type ActorIdentifier,
1313- type CanonicalResourceUri,
1413 type Did,
1514 type RecordKey,
1615 type ResourceUri
+5-4
src/components/FollowingView.svelte
···2828 let isLongCalculation = $state(false);
2929 let calculationTimer: ReturnType<typeof setTimeout> | undefined;
30303131- // Optimization: Use a static timestamp for calculation to avoid re-sorting every second.
3232- // Only update this when the sort mode changes.
3131+ // we could update the "now" every second but its pretty unnecessary
3232+ // so we only do it when we receive new data or sort mode changes
3333 let staticNow = $state(Date.now());
34343535 const updateList = async () => {
···5959 )
6060 : null;
61616262- const userStatsList = Array.from(followsMap.values()).map((f) => ({
6262+ const userStatsList = followsMap.values().map((f) => ({
6363 did: f.subject,
6464 data: calculateFollowedUserStats(
6565 followingSort,
···8080 isLongCalculation = false;
8181 };
82828383+ // todo: there is a bug where
8384 $effect(() => {
8485 // Dependencies that trigger a re-sort
8586 // eslint-disable-next-line @typescript-eslint/no-unused-vars
8687 const _s = followingSort;
8788 // eslint-disable-next-line @typescript-eslint/no-unused-vars
8888- const _f = followsMap;
8989+ const _f = followsMap?.size;
8990 // Update time when sort changes
9091 staticNow = Date.now();
9192