diff --git a/app/build.gradle b/app/build.gradle index 17bf419..1027656 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,7 +30,7 @@ android { targetSdkVersion 35 versionCode 2106 // versionName "2.1.6" - versionName "2.1.6-Beta1" + versionName "2.1.6-Beta3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 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 e327dec..7087aed 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 @@ -551,10 +551,6 @@ class MapV3Fragment : BaseFragment(FragmentMapV3Binding::i R.color.grey_color } tvHomeMapLiveTitle.setTextColor(ContextCompat.getColor(mContext!!, tColor)) - val share = MMKVUtil.getInt(MMKVKey.Shared) - if (share != ConstantInt.NoShare) { - homeMapLiveBtn.visibility = View.GONE - } ivHomeMapLiveImage.let { val bg = if (canLive) { @@ -576,12 +572,19 @@ class MapV3Fragment : BaseFragment(FragmentMapV3Binding::i private fun setMapDeviceBean(mapDeviceBean: MapDeviceBean) { mapDeviceBean.apply { - //分钟后无上报、没有lte信号或在wifi中隐藏直播按钮 - 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 + val share = MMKVUtil.getInt(MMKVKey.Shared) + mViewBinding.homeMapLiveBtn.visibility = if (share != ConstantInt.NoShare) { + View.GONE + } else { + if (liveFlag == ConstantInt.Type1) View.GONE + else { + //分钟后无上报、没有lte信号或在wifi中隐藏直播按钮 + isCanLive = + !(Util.isTimeoutReport(updateTime) || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || powerSwitch == ConstantInt.Type3 || inWifiZone == ConstantInt.Type1) + setLiveBtnState(isCanLive) + View.VISIBLE + } + } mViewBinding.ilHomeMapDeviceBatteryLayout.let { mMapViewModel.setMapDeviceBattery(