Merge pull request #399 from zjs81/contacts-sync

fix issues with contact sync
This commit is contained in:
zjs81
2026-04-30 15:41:25 -07:00
committed by GitHub
5 changed files with 51 additions and 8 deletions
+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();