Fix race conditions

This commit is contained in:
zach
2025-12-30 21:42:14 -07:00
parent 83b2817cc4
commit be97e5c7fc
4 changed files with 197 additions and 10 deletions
+12 -2
View File
@@ -413,10 +413,20 @@ class _ChatScreenState extends State<ChatScreen> {
return;
}
final pathBytes = Uint8List.fromList(path.pathBytes);
final pathLength = path.pathBytes.length;
await connector.setContactPath(
widget.contact,
Uint8List.fromList(path.pathBytes),
path.pathBytes.length,
pathBytes,
pathLength,
);
// Update contact in memory directly for immediate UI feedback
connector.updateContactInMemory(
widget.contact.publicKeyHex,
pathBytes: pathBytes,
pathLength: pathLength,
);
if (!context.mounted) return;