[6.10.0][Fix]过滤重复的车龙事件
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user