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