1.删除1分钟定位时间设置
2.修复route页面从正常宠物切换到过期宠物时,会弹两个充值提示弹窗bug
This commit is contained in:
@@ -30,7 +30,7 @@ android {
|
||||
targetSdkVersion 35
|
||||
versionCode 2105
|
||||
// versionName "2.1.5"
|
||||
versionName "2.1.5-Beta1"
|
||||
versionName "2.1.5-Beta2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -108,15 +108,13 @@ class SubscriptionHistoryAdapter(
|
||||
visibility = View.VISIBLE
|
||||
when (item.orderStatus) {
|
||||
1 -> {
|
||||
val updateTimestamp = Utils.stringToTimestamp(item.updateTime)
|
||||
val updateTimestamp = Utils.stringToTimestamp(item.updateTime, isUtc = true)
|
||||
val nowTimestamp = System.currentTimeMillis()
|
||||
if (item.mealUnit == ConstantString.PackageUnitDay) {
|
||||
if (item.enabled == ConstantInt.Type0 || (item.surplusDays == 0L && item.subscriptionStatus == ConstantInt.Close)) {
|
||||
visibility = View.GONE
|
||||
} else {
|
||||
visibility = View.VISIBLE
|
||||
setText(R.string.txt_refund)
|
||||
}
|
||||
if (item.enabled == ConstantInt.Type0 || (item.surplusDays == 0L && item.subscriptionStatus == ConstantInt.Close)) {
|
||||
visibility = View.GONE
|
||||
} else if (item.mealUnit == ConstantString.PackageUnitDay) {
|
||||
visibility = View.VISIBLE
|
||||
setText(R.string.txt_refund)
|
||||
} else if (item.mealUnit == ConstantString.PackageUnitMonth) {
|
||||
val day7Timestamp = 7 * 24 * 60 * 60 * 1000L
|
||||
//套餐超出7天不能退款
|
||||
|
||||
@@ -103,6 +103,9 @@ class HomeV2Activity : BaseActivity<ActivityHomeV2Binding>(ActivityHomeV2Binding
|
||||
//是否已经触发倒计时自动连接设备
|
||||
private var isCountdownAutoConnBle = false
|
||||
|
||||
//是否检查套餐过期
|
||||
private var isCheckPackageExpire = true
|
||||
|
||||
private val mFragments = mutableListOf<Fragment>(
|
||||
ActivityV2Fragment.newInstance(this),
|
||||
RouteV2Fragment.newInstance(this),
|
||||
@@ -541,7 +544,7 @@ class HomeV2Activity : BaseActivity<ActivityHomeV2Binding>(ActivityHomeV2Binding
|
||||
private fun packageUnavailableState() {
|
||||
getPet(false)?.apply {
|
||||
//判断套餐有没有到期
|
||||
if (shared == ConstantInt.NoShare && availableOrder == ConstantInt.Type0) {
|
||||
if (isCheckPackageExpire && shared == ConstantInt.NoShare && availableOrder == ConstantInt.Type0) {
|
||||
Util.checkPackageExpired(this@HomeV2Activity, deviceId)
|
||||
}
|
||||
}
|
||||
@@ -573,7 +576,8 @@ class HomeV2Activity : BaseActivity<ActivityHomeV2Binding>(ActivityHomeV2Binding
|
||||
/**
|
||||
* 选择宠物弹窗
|
||||
*/
|
||||
fun selectPetDialog() {
|
||||
fun selectPetDialog(checkPackageExpire: Boolean = true) {
|
||||
isCheckPackageExpire = checkPackageExpire
|
||||
if (mPetList.size == 0) {
|
||||
showToast(R.string.no_bind_pet)
|
||||
return
|
||||
|
||||
@@ -113,7 +113,7 @@ class TrackingDurationSetActivity :
|
||||
|
||||
private fun setListData() {
|
||||
val durationList = mutableListOf<DataBean>()
|
||||
val timeList = mutableListOf(1, 3, 5, 10, 15)
|
||||
val timeList = mutableListOf(3, 5, 10, 15)
|
||||
for (time in timeList) {
|
||||
DataBean().apply {
|
||||
imageId = time
|
||||
|
||||
@@ -66,7 +66,8 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
|
||||
|
||||
//是否选过自定义日期,没有则再次回到这个页面,刷新取24小时的记录
|
||||
private var isSelectCustomDate = false
|
||||
private var isFirst = true
|
||||
|
||||
// private var isFirst = true
|
||||
private var mProgress = -1
|
||||
|
||||
//充值续费或升级返回类型
|
||||
@@ -155,6 +156,7 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
|
||||
}
|
||||
|
||||
private fun initState() {
|
||||
mViewBinding.miHomeRouteAddressView.visibility = View.GONE
|
||||
mHistoryDataMapCommon.clearAllMarker()
|
||||
setSeekBarMax(0)
|
||||
}
|
||||
@@ -264,28 +266,23 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
|
||||
//详细位置
|
||||
address = it
|
||||
|
||||
// val timeString = String.format(
|
||||
// getString(R.string.map_current_update_time),
|
||||
// DateUtils.getRelativeTimeSpanString(timeStamp * 1000)
|
||||
// )
|
||||
val timeString = Utils.formatTime(timeStamp * 1000, Utils.DATE_FORMAT_PATTERN_EN10)
|
||||
//更新位置时间
|
||||
dayTime = timeString
|
||||
|
||||
var delay = 500L
|
||||
//第一次延时,等待地图动画执行完成
|
||||
if (isFirst) {
|
||||
isFirst = false
|
||||
delay = 1500
|
||||
}
|
||||
// var delay = 500L
|
||||
// //第一次延时,等待地图动画执行完成
|
||||
// if (isFirst) {
|
||||
// isFirst = false
|
||||
// delay = 1500
|
||||
// }
|
||||
mViewBinding.root.postDelayed(
|
||||
{
|
||||
// mHistoryDataMapCommon.showInfoWindow(this)
|
||||
mViewBinding.miHomeRouteAddressView.let { mi ->
|
||||
mi.visibility = View.VISIBLE
|
||||
mi.setShowText(timeString, it)
|
||||
}
|
||||
}, delay
|
||||
}, 100
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -389,7 +386,6 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
|
||||
|
||||
getHomeV2Activity()?.getPet()?.apply {
|
||||
initState()
|
||||
mViewBinding.miHomeRouteAddressView.visibility = View.GONE
|
||||
mDataDetailViewModel.getHistoryByDay(
|
||||
getHomeV2Activity()!!, deviceId, mFromTimestamp / 1000, mToTimestamp / 1000
|
||||
)
|
||||
@@ -432,7 +428,9 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
|
||||
// mContext, NotificationV2Activity::class.java
|
||||
// )
|
||||
// )
|
||||
ilHomeRoutePetHead.homeDataPetNameSmall, ilHomeRoutePetHead.homeDataPetHeadSmall.root -> getHomeV2Activity()?.selectPetDialog()
|
||||
ilHomeRoutePetHead.homeDataPetNameSmall, ilHomeRoutePetHead.homeDataPetHeadSmall.root -> getHomeV2Activity()?.selectPetDialog(
|
||||
false
|
||||
)
|
||||
|
||||
llHomeRouteCalendarFrom -> {
|
||||
getHomeV2Activity()?.getPet()?.let {
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.pm.PackageManager
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.Typeface
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.view.isVisible
|
||||
import com.abbidot.baselibrary.constant.MMKVKey
|
||||
import com.abbidot.baselibrary.util.AppUtils
|
||||
import com.abbidot.baselibrary.util.LogUtil
|
||||
@@ -92,7 +93,7 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
|
||||
googleMap.apply {
|
||||
setOnCameraMoveListener {
|
||||
mCurLatLng?.let {
|
||||
setMarkerInfoViewOffset(mMarkerInfoView, it)
|
||||
if (mMarkerInfoView.isVisible) setMarkerInfoViewOffset(mMarkerInfoView, it)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user