Browse Source

[fit]优化地址为空时舍弃上报

zk 11 tháng trước cách đây
mục cha
commit
7fcad83a8d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      lib/socket/atmob_location_client.dart

+ 3 - 1
lib/socket/atmob_location_client.dart

@@ -210,7 +210,9 @@ class AtmobLocationClient {
 
   void uploadLocation(MapLocation location) {
     if (_webSocket == null ||
-        location.latitude == 0 && location.longitude == 0) {
+        location.latitude == 0 && location.longitude == 0 ||
+        location.address == null ||
+        location.address!.isEmpty) {
       return;
     }
     _sendMessage(LocationMessage.obtainMessage(location));