From 795fcec1a23fed4950315279fa63c00b96c51e3a Mon Sep 17 00:00:00 2001 From: yezhiqiu <983577727@qq.com> Date: Thu, 29 Jan 2026 18:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B4=E6=92=AD=E7=AD=89?= =?UTF-8?q?=E4=BA=8E1=EF=BC=8C=E9=9A=90=E8=97=8F=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/abbidot/tracker/ui/fragment/map/MapV3Fragment.kt | 8 +++++++- app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/abbidot/tracker/ui/fragment/map/MapV3Fragment.kt b/app/src/main/java/com/abbidot/tracker/ui/fragment/map/MapV3Fragment.kt index f86613a..e327dec 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/fragment/map/MapV3Fragment.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/fragment/map/MapV3Fragment.kt @@ -248,6 +248,10 @@ class MapV3Fragment : BaseFragment(FragmentMapV3Binding::i XEventBus.observe(this, EventName.RefreshFences) { updateMapDeviceStatus() } + //删除设备 + XEventBus.observe(this, EventName.DeleteDevice) { + mMapViewModel.stopGetData() + } //直播自动结束提示 XEventBus.observe(this, EventName.LiveAutoEnd) { CommonDialog1( @@ -576,6 +580,8 @@ class MapV3Fragment : BaseFragment(FragmentMapV3Binding::i isCanLive = !(Util.isTimeoutReport(updateTime) || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || powerSwitch == ConstantInt.Type3 || inWifiZone == ConstantInt.Type1) setLiveBtnState(isCanLive) + mViewBinding.homeMapLiveBtn.visibility = if (liveFlag == ConstantInt.Type1) View.GONE + else View.VISIBLE mViewBinding.ilHomeMapDeviceBatteryLayout.let { mMapViewModel.setMapDeviceBattery( @@ -681,7 +687,7 @@ class MapV3Fragment : BaseFragment(FragmentMapV3Binding::i } else { mShowCenterLocationType = ConstantInt.PetLocationType isMoveCamera = true - updateMapDeviceStatus(useBleLocation = true) + updateMapDeviceStatus(useBleLocation = false) } ViewUtil.instance.setMapSwitchLocationButtonImage( homeMapRefreshBtn, mShowCenterLocationType diff --git a/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt b/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt index b1bea3f..5de5e45 100644 --- a/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt +++ b/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt @@ -32,7 +32,7 @@ class MapViewModel : ViewModel() { private var mCountDownTimer: CountDownTimer? = null //几分钟倒计时(min) - private var mRefreshDataMin = 0.5f + private var mRefreshDataMin = 0.35f private var mDeviceId = "" var mDeviceMsgType = ConstantInt.SpecialType