ソースを参照

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

zk 7 ヶ月 前
コミット
7fcad83a8d
1 ファイル変更3 行追加1 行削除
  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));