1.修复显示所有宠物开启,切换宠物时,宠物的位置会变化bug

2.修复显示所有宠物的开关,在Map 和直播中未关联,直播页中开启/关闭,但在Map中未同步bug
This commit is contained in:
2026-06-11 17:17:34 +08:00
parent bb5bd7adf3
commit d4f5a1e0a3
15 changed files with 134 additions and 17 deletions

View File

@@ -1 +1 @@
#Thu Jun 04 09:43:21 CST 2026 #Tue Jun 09 18:35:33 CST 2026

View File

@@ -30,7 +30,7 @@ android {
targetSdkVersion 35 targetSdkVersion 35
versionCode 2210 versionCode 2210
// versionName "2.2.10" // versionName "2.2.10"
versionName "2.2.10-Beta2" versionName "2.2.10-Beta3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -79,6 +79,9 @@ class SelectMapTypeDialog(
mViewBinding.cbDialogMapAllPetSwitch.isChecked = checked mViewBinding.cbDialogMapAllPetSwitch.isChecked = checked
} }
/**
* 是否显示按钮
*/
fun showAllPetSwitch(isShow: Boolean) { fun showAllPetSwitch(isShow: Boolean) {
mViewBinding.llMapTypeShowAllPetSwitch.visibility = if (isShow) View.VISIBLE else View.GONE mViewBinding.llMapTypeShowAllPetSwitch.visibility = if (isShow) View.VISIBLE else View.GONE
} }

View File

@@ -24,7 +24,6 @@ class SayHelloActivity : BaseActivity<ActivitySayHelloBinding>(ActivitySayHelloB
mViewBinding.apply { mViewBinding.apply {
root.setBackgroundResource(R.drawable.icon_say_hi_bg) root.setBackgroundResource(R.drawable.icon_say_hi_bg)
if (AppUtils.isChina()) { if (AppUtils.isChina()) {
btnSayHelloLoginWechat.visibility = View.VISIBLE btnSayHelloLoginWechat.visibility = View.VISIBLE
} }
setOnClickListenerViews(btnSayHelloLogin, btnSayHelloSignup, btnSayHelloLoginWechat) setOnClickListenerViews(btnSayHelloLogin, btnSayHelloSignup, btnSayHelloLoginWechat)

View File

@@ -198,7 +198,7 @@ class SplashActivity : QMUIActivity() {
SDKInitializer.setCoordType(CoordType.GCJ02) SDKInitializer.setCoordType(CoordType.GCJ02)
if (AppUtils.isChina()) { if (AppUtils.isChina()) {
regToWx() // regToWx()
} else { } else {
initMapbox() initMapbox()
try { try {

View File

@@ -847,7 +847,7 @@ class LiveActivityV3 : BaseActivity<ActivityLiveV3Binding>(ActivityLiveV3Binding
lifecycleScope.launch { lifecycleScope.launch {
mPetList?.apply { mPetList?.apply {
mPetBean?.let { p -> mPetBean?.let { p ->
//删除当前选中宠物 //List删除当前选中宠物
mHomeMapCommon.showOtherPetHeadMarker(filter { it != p }.toMutableList()) mHomeMapCommon.showOtherPetHeadMarker(filter { it != p }.toMutableList())
} }
} }

View File

@@ -0,0 +1,27 @@
package com.abbidot.tracker.ui.fragment.account.cn
import androidx.fragment.app.Fragment
import com.abbidot.tracker.base.BaseFragment
import com.abbidot.tracker.databinding.FragmentAccountCnPhoneBinding
/**
* A simple [Fragment] subclass.
* Use the [AccountCnPhoneFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class AccountCnPhoneFragment :
BaseFragment<FragmentAccountCnPhoneBinding>(FragmentAccountCnPhoneBinding::inflate) {
companion object {
@JvmStatic
fun newInstance() =
AccountCnPhoneFragment().apply {
}
}
override fun initData() {
super.initData()
}
}

View File

@@ -247,7 +247,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
if (null == mSelectMapTypeDialog) { if (null == mSelectMapTypeDialog) {
setAllPetShow(showAllPet) setAllPetShow(showAllPet)
} else { } else {
mSelectMapTypeDialog?.setShowAllPetSwitch(showDashed) mSelectMapTypeDialog?.setShowAllPetSwitch(showAllPet)
} }
} }
} }
@@ -672,6 +672,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
* 设置多宠物显示 * 设置多宠物显示
*/ */
private fun setAllPetShow(isShow: Boolean) { private fun setAllPetShow(isShow: Boolean) {
if (isShowAllPet == isShow) return
isShowAllPet = isShow isShowAllPet = isShow
MMKVUtil.putBoolean(MMKVKey.ShowAllPet, isShow) MMKVUtil.putBoolean(MMKVKey.ShowAllPet, isShow)
if (isShow) { if (isShow) {
@@ -719,6 +720,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
mViewBinding.ilHomeMapPetLocation.root.visibility = View.INVISIBLE mViewBinding.ilHomeMapPetLocation.root.visibility = View.INVISIBLE
mViewBinding.ivHomeMapBleConState.setImageResource(R.drawable.icon_map_offline) mViewBinding.ivHomeMapBleConState.setImageResource(R.drawable.icon_map_offline)
isCanLive = false isCanLive = false
isShowAllPet=false
setRefreshLocationBtnState() setRefreshLocationBtnState()
ViewUtil.instance.selectPetDialogShow( ViewUtil.instance.selectPetDialogShow(
@@ -799,7 +801,8 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
if (isShowDashed) { if (isShowDashed) {
mHomeMapCommon.addUserAndPetLine() mHomeMapCommon.addUserAndPetLine()
} }
if (isShowAllPet) { if (MMKVUtil.getBoolean(MMKVKey.ShowAllPet)) {
mSelectMapTypeDialog?.setShowAllPetSwitch(true)
setAllPetShow(true) setAllPetShow(true)
} }
} }
@@ -919,6 +922,15 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
View.VISIBLE View.VISIBLE
} }
} }
//把最新经纬度更新到获取绑定宠物接口上,切换宠物数据不会有老的数据
getHomeV2Activity()?.let { m ->
m.getPet(false)?.let { p ->
if (p.macID == deviceMacId) {
p.latitude = latitude
p.longitude = longitude
}
}
}
setRefreshLocationBtnState() setRefreshLocationBtnState()

View File

@@ -6,12 +6,13 @@
android:background="@drawable/shape16_white_color_bg" android:background="@drawable/shape16_white_color_bg"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="@dimen/dp_18" android:paddingTop="@dimen/dp_18"
android:paddingBottom="@dimen/dp_6"> android:paddingBottom="@dimen/dp_14">
<com.abbidot.tracker.widget.TypefaceTextView <com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_common_dialog_title" android:id="@+id/tv_common_dialog_title"
style="@style/my_TextView_style" style="@style/my_TextView_style"
android:layout_marginTop="@dimen/dp_4" android:layout_marginTop="@dimen/dp_4"
android:layout_marginHorizontal="@dimen/dp_18"
android:layout_marginBottom="@dimen/dp_12" android:layout_marginBottom="@dimen/dp_12"
android:text="@string/txt_setting_notification" android:text="@string/txt_setting_notification"
android:textSize="@dimen/textSize24" android:textSize="@dimen/textSize24"
@@ -22,6 +23,7 @@
android:id="@+id/tv_common_dialog_content" android:id="@+id/tv_common_dialog_content"
style="@style/my_TextView_style" style="@style/my_TextView_style"
android:layout_marginTop="@dimen/dp_4" android:layout_marginTop="@dimen/dp_4"
android:layout_marginHorizontal="@dimen/dp_18"
android:text="@string/txt_view_access" android:text="@string/txt_view_access"
android:textColor="@color/select_color3" android:textColor="@color/select_color3"
android:textSize="@dimen/textSize14" android:textSize="@dimen/textSize14"
@@ -33,7 +35,7 @@
android:layout_height="@dimen/dp_42" android:layout_height="@dimen/dp_42"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_24" android:layout_marginTop="@dimen/dp_24"
android:layout_marginBottom="@dimen/dp_2" android:layout_marginBottom="@dimen/dp_8"
android:gravity="center" android:gravity="center"
android:minWidth="@dimen/dp_140" android:minWidth="@dimen/dp_140"
android:paddingHorizontal="@dimen/dp_28" android:paddingHorizontal="@dimen/dp_28"
@@ -49,7 +51,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:background="@drawable/selector_transparent_pressed" android:background="@drawable/selector_transparent_pressed"
android:padding="@dimen/dp_12" android:paddingHorizontal="@dimen/dp_12"
android:paddingVertical="@dimen/dp_6"
android:text="@string/txt_later" android:text="@string/txt_later"
android:textColor="@color/select_color" android:textColor="@color/select_color"
android:textSize="@dimen/textSize14" android:textSize="@dimen/textSize14"

View File

@@ -6,11 +6,12 @@
android:background="@drawable/shape16_white_color_bg" android:background="@drawable/shape16_white_color_bg"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="@dimen/dp_18" android:paddingTop="@dimen/dp_18"
android:paddingBottom="@dimen/dp_6"> android:paddingBottom="@dimen/dp_14">
<com.abbidot.tracker.widget.TypefaceTextView <com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_common_dialog2_title" android:id="@+id/tv_common_dialog2_title"
style="@style/my_TextView_style" style="@style/my_TextView_style"
android:layout_marginHorizontal="@dimen/dp_18"
android:layout_marginTop="@dimen/dp_4" android:layout_marginTop="@dimen/dp_4"
android:text="@string/txt_upgrade_unlock" android:text="@string/txt_upgrade_unlock"
android:textSize="@dimen/textSize14" android:textSize="@dimen/textSize14"
@@ -24,7 +25,7 @@
android:layout_height="@dimen/dp_45" android:layout_height="@dimen/dp_45"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_18" android:layout_marginTop="@dimen/dp_18"
android:layout_marginBottom="@dimen/dp_2" android:layout_marginBottom="@dimen/dp_8"
android:text="@string/txt_upgrade_now" android:text="@string/txt_upgrade_now"
android:textColor="@color/select_color" android:textColor="@color/select_color"
android:textSize="@dimen/textSize16" android:textSize="@dimen/textSize16"
@@ -37,7 +38,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:background="@drawable/selector_transparent_pressed" android:background="@drawable/selector_transparent_pressed"
android:padding="@dimen/dp_12" android:paddingHorizontal="@dimen/dp_12"
android:paddingVertical="@dimen/dp_6"
android:text="@string/txt_later" android:text="@string/txt_later"
android:textColor="@color/select_color" android:textColor="@color/select_color"
android:textSize="@dimen/textSize14" android:textSize="@dimen/textSize14"

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="@dimen/dp_16"
android:paddingTop="@dimen/dp_24"
android:paddingBottom="@dimen/dp_36"
tools:context=".ui.fragment.account.cn.AccountCnPhoneFragment">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:text="@string/txt_account"
android:textColor="@color/black_color5"
android:textSize="@dimen/textSize32"
android:textStyle="bold" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/dp_8"
android:gravity="start"
android:text="@string/txt_reset_password_tips"
android:textColor="@color/select_color3"
android:textSize="@dimen/textSize14"
android:visibility="gone"
app:typeface="@string/roboto_regular_font" />
<include
android:id="@+id/il_create_account_v2_email"
layout="@layout/layout_input_edit_view"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_66"
android:layout_marginTop="@dimen/dp_32" />
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_email_error_tip_create_account_v2"
style="@style/my_TextView_style_v2"
android:layout_below="@id/il_login_v2_email_address"
android:layout_marginTop="@dimen/dp_10"
android:text="@string/txt_valid_email"
android:textColor="@color/red_color2"
android:textSize="@dimen/textSize14"
android:visibility="gone"
app:typeface="@string/roboto_regular_font" />
<include
android:id="@+id/il_create_account_v2_policy_terms_check"
layout="@layout/layout_create_account_policy_terms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_18" />
<com.abbidot.tracker.widget.TypefaceButton
android:id="@+id/btn_create_account_v2_continue"
style="@style/my_match_RoundRect_Button_style"
android:text="@string/txt_continue"
app:qmui_radius="@dimen/dp_64"
app:typeface="@string/roboto_bold_font" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="match_parent"
android:text="@string/txt_verify_your_email"
android:textColor="@color/select_color3"
android:textSize="@dimen/textSize14"
app:typeface="@string/roboto_regular_font" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -1060,5 +1060,6 @@
<string name="txt_already_min_size">已是最小尺寸</string> <string name="txt_already_min_size">已是最小尺寸</string>
<string name="txt_use_valid_phone">请使用有效的手机号码</string> <string name="txt_use_valid_phone">请使用有效的手机号码</string>
<string name="txt_account">账户</string>
</resources> </resources>

View File

@@ -672,7 +672,7 @@
<string name="txt_add_tracker_tip2">Device already bound, please verify \nand try again</string> <string name="txt_add_tracker_tip2">Device already bound, please verify \nand try again</string>
<string name="txt_add_tracker">Add Tracker</string> <string name="txt_add_tracker">Add Tracker</string>
<string name="txt_success_paired">Successfully\nPaired</string> <string name="txt_success_paired">Successfully\nPaired</string>
<string name="txt_choose_your_plan">Choose your plan</string> <string name="txt_choose_your_plan">Choose Your Plan</string>
<string name="txt_benefits">Benefits</string> <string name="txt_benefits">Benefits</string>
<string name="txt_monthly_subscription">Monthly Subscription</string> <string name="txt_monthly_subscription">Monthly Subscription</string>
<string name="txt_money_unit">$%s</string> <string name="txt_money_unit">$%s</string>
@@ -1118,5 +1118,6 @@
<string name="txt_already_min_size">Already at minimum size</string> <string name="txt_already_min_size">Already at minimum size</string>
<string name="txt_use_valid_phone">请使用有效的手机号码</string> <string name="txt_use_valid_phone">请使用有效的手机号码</string>
<string name="txt_account">账户</string>
</resources> </resources>

View File

@@ -93,7 +93,7 @@ class AppUtils {
* 是否是国内 * 是否是国内
*/ */
fun isChina(type: String = SWITCH_PAGE_TYPE): Boolean { fun isChina(type: String = SWITCH_PAGE_TYPE): Boolean {
// return false return false
if (isDebug()) { if (isDebug()) {
if (type == SWITCH_MAP_TYPE && MMKVUtil.getBoolean(MMKVKey.OnlyGoogleMap, false)) { if (type == SWITCH_MAP_TYPE && MMKVUtil.getBoolean(MMKVKey.OnlyGoogleMap, false)) {
//只启用谷歌地图 //只启用谷歌地图

View File

@@ -10,7 +10,7 @@
# This option should only be used with decoupled projects. For more details, visit # This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true # org.gradle.parallel=true
#Tue Jun 09 14:21:45 CST 2026 #Wed Jun 10 09:53:29 CST 2026
BAIDU_MAP_KEY=YT2CmlqAkpMyzmw1AKNIBlYlBtHESEaW BAIDU_MAP_KEY=YT2CmlqAkpMyzmw1AKNIBlYlBtHESEaW
BUGLY_KEY=06fc0a9cd1 BUGLY_KEY=06fc0a9cd1
GOOGLE_MAP_KEY=AIzaSyCFEqlOoo2274NsX7tzoQjs_DA7B9N7-gY GOOGLE_MAP_KEY=AIzaSyCFEqlOoo2274NsX7tzoQjs_DA7B9N7-gY
@@ -25,4 +25,4 @@ android.nonTransitiveRClass=false
android.suppressUnsupportedCompileSdk=34 android.suppressUnsupportedCompileSdk=34
android.useAndroidX=true android.useAndroidX=true
kotlin.code.style=official kotlin.code.style=official
org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1536M" -Dfile.encoding\=UTF-8 org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1024M" -Dfile.encoding\=UTF-8