优化一键定位按钮跟随直播按钮一起隐藏显示

This commit is contained in:
2026-10-09 18:16:39 +08:00
parent 09acfc1564
commit 6e4913720d
2 changed files with 9 additions and 3 deletions

View File

@@ -954,6 +954,10 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
View.VISIBLE
}
}
//直播状态下隐藏刷新位置按钮
mViewBinding.ivHomeMapRefreshLocation.visibility =
if (liveFlag == ConstantInt.Type1) View.INVISIBLE
else View.VISIBLE
//把最新经纬度更新到获取绑定宠物接口上,切换宠物数据不会有老的数据
getHomeV2Activity()?.let { m ->
m.getPet(false)?.let { p ->
@@ -1019,7 +1023,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
if (!mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
val intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
startActivity(intent)
} else if (isRequestPetData && mPetList.size == 0) {
} else if (isRequestPetData && mPetList.isEmpty()) {
showToast(R.string.no_bind_pet)
} else {
goLive(true)
@@ -1027,7 +1031,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
} else if (type == 1) {
if (!SRBleUtil.instance.isBleEnable(mContext)) {
SRBleUtil.instance.openBluetooth(mContext)
} else if (isRequestPetData && mPetList.size == 0) {
} else if (isRequestPetData && mPetList.isEmpty()) {
showToast(R.string.no_bind_pet)
} else {
goLive(false)
@@ -1219,6 +1223,8 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
return
}
// locationPermissionsTip()
v.visibility = View.GONE
ivHomeMapRefreshLocation.visibility = View.INVISIBLE
goLive(true)
}