refactor friends sort

This commit is contained in:
pa
2026-03-14 20:57:23 +09:00
parent 84f46a5645
commit a8d1b7a905
8 changed files with 477 additions and 193 deletions

View File

@@ -121,6 +121,7 @@ export async function runUpdateFriendDelayedCheckFlow(
syncFriendSearchIndex(ctx);
}
ctx.isVIP = isVIP;
friendStore.reindexSortedFriend(ctx);
}
/**
@@ -209,6 +210,7 @@ export async function runUpdateFriendFlow(
ctx.name = ref.displayName;
syncFriendSearchIndex(ctx);
}
friendStore.reindexSortedFriend(ctx);
return;
}
if (
@@ -248,6 +250,7 @@ export async function runUpdateFriendFlow(
previousLocationAt: $location_at
});
ctx.pendingOffline = true;
friendStore.reindexSortedFriend(ctx);
return;
}
ctx.ref = ref;
@@ -262,6 +265,8 @@ export async function runUpdateFriendFlow(
$location_at,
{ now, nowIso }
);
} else {
friendStore.reindexSortedFriend(ctx);
}
}
@@ -309,4 +314,3 @@ export async function runPendingOfflineTickFlow({
}
}
}

View File

@@ -184,6 +184,7 @@ export function applyUser(json) {
friendCtx.ref = ref;
friendCtx.name = ref.displayName;
syncFriendSearchIndex(friendCtx);
friendStore.reindexSortedFriend(friendCtx);
}
if (ref.id === currentUser.id) {
if (ref.status) {