Merge pull request #399 from zjs81/contacts-sync

fix issues with contact sync
This commit is contained in:
zjs81 authored and GitHub committed 2026-04-30 15:41:25 -07:00
commit f1d93bd5e8
5 files changed
+51 -8

No files matched your search

+9 -4
View File
@@ -735,10 +735,15 @@ Uint8List buildUpdateContactPathFrame(
writer.writeInt32LE((longitude * 1e6).round());
}
if (lastModified != null) {
// Last modified
final lastModifiedTimestamp = lastModified.millisecondsSinceEpoch ~/ 1000;
writer.writeUInt32LE(lastModifiedTimestamp);
final hasLocation = lat != null && lon != null;
if (hasLocation || lastModified != null) {
writer.writeInt32LE(hasLocation ? (lat * 1e6).round() : 0);
writer.writeInt32LE(hasLocation ? (lon * 1e6).round() : 0);
if (lastModified != null) {
// Last modified
final lastModifiedTimestamp = lastModified.millisecondsSinceEpoch ~/ 1000;
writer.writeUInt32LE(lastModifiedTimestamp);
}
}
return writer.toBytes();