修复分享设备还可以直播的bug

This commit is contained in:
yezhiqiu
2026-01-30 11:19:12 +08:00
parent 795fcec1a2
commit 75014598ed
2 changed files with 14 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ android {
targetSdkVersion 35 targetSdkVersion 35
versionCode 2106 versionCode 2106
// versionName "2.1.6" // versionName "2.1.6"
versionName "2.1.6-Beta1" versionName "2.1.6-Beta3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -551,10 +551,6 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
R.color.grey_color R.color.grey_color
} }
tvHomeMapLiveTitle.setTextColor(ContextCompat.getColor(mContext!!, tColor)) tvHomeMapLiveTitle.setTextColor(ContextCompat.getColor(mContext!!, tColor))
val share = MMKVUtil.getInt(MMKVKey.Shared)
if (share != ConstantInt.NoShare) {
homeMapLiveBtn.visibility = View.GONE
}
ivHomeMapLiveImage.let { ivHomeMapLiveImage.let {
val bg = if (canLive) { val bg = if (canLive) {
@@ -576,12 +572,19 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
private fun setMapDeviceBean(mapDeviceBean: MapDeviceBean) { private fun setMapDeviceBean(mapDeviceBean: MapDeviceBean) {
mapDeviceBean.apply { mapDeviceBean.apply {
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中隐藏直播按钮 //分钟后无上报、没有lte信号或在wifi中隐藏直播按钮
isCanLive = isCanLive =
!(Util.isTimeoutReport(updateTime) || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || powerSwitch == ConstantInt.Type3 || inWifiZone == ConstantInt.Type1) !(Util.isTimeoutReport(updateTime) || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || powerSwitch == ConstantInt.Type3 || inWifiZone == ConstantInt.Type1)
setLiveBtnState(isCanLive) setLiveBtnState(isCanLive)
mViewBinding.homeMapLiveBtn.visibility = if (liveFlag == ConstantInt.Type1) View.GONE View.VISIBLE
else View.VISIBLE }
}
mViewBinding.ilHomeMapDeviceBatteryLayout.let { mViewBinding.ilHomeMapDeviceBatteryLayout.let {
mMapViewModel.setMapDeviceBattery( mMapViewModel.setMapDeviceBattery(