[6.10.0][Fix]过滤重复的车龙事件

This commit is contained in:
chenfufeng
2025-02-20 11:59:49 +08:00
parent d5bad20286
commit c2dca3c81d
2 changed files with 32 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.map.MogoData.Companion.mogoMapData
import kotlinx.android.synthetic.main.view_map_download_progress.view.download_pb
import kotlinx.android.synthetic.main.view_map_download_progress.view.ivBackground
@@ -35,6 +36,7 @@ class MapDownloadView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMapDevaListenerManager.addListener("${TAG}${this.hashCode()}", this)
initDownloadProgress()
}
override fun onDetachedFromWindow() {
@@ -78,4 +80,16 @@ class MapDownloadView @JvmOverloads constructor(
updateMapStatus(type, progress)
}
}
private fun initDownloadProgress() {
ThreadUtils.getIoPool().execute {
mogoMapData.get()?.isCityDataCached { isCached ->
if (isCached) {
UiThreadHandler.post {
updateMapStatus(1, 100)
}
}
}
}
}
}