Flush through all contacts with more care to prevent rerenders

This commit is contained in:
Jack Kingsman
2026-02-09 19:52:41 -08:00
parent d0c5c09493
commit ec97dfcee5

View File

@@ -644,7 +644,7 @@ export function App() {
const handleCreateContact = useCallback(
async (name: string, publicKey: string, tryHistorical: boolean) => {
const created = await api.createContact(publicKey, name || undefined, tryHistorical);
const data = await api.getContacts();
const data = await fetchAllContacts();
setContacts(data);
setActiveConversation({
@@ -653,7 +653,7 @@ export function App() {
name: getContactDisplayName(created.name, created.public_key),
});
},
[]
[fetchAllContacts]
);
// Create channel handler