mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
Flush through all contacts with more care to prevent rerenders
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user