修复分享设备还可以直播的bug
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -551,10 +551,6 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(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>(FragmentMapV3Binding::i
|
||||
|
||||
private fun setMapDeviceBean(mapDeviceBean: MapDeviceBean) {
|
||||
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中隐藏直播按钮
|
||||
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
|
||||
View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
mViewBinding.ilHomeMapDeviceBatteryLayout.let {
|
||||
mMapViewModel.setMapDeviceBattery(
|
||||
|
||||
Reference in New Issue
Block a user