修改任务下载刷新不及时

This commit is contained in:
squallzhjch
2023-07-25 10:37:06 +08:00
parent 5806fbf5ac
commit 33cc1dc243
5 changed files with 39 additions and 20 deletions

View File

@@ -133,10 +133,13 @@ class TaskDownloadScope(
importOMDBHelper.importOmdbZipFile(importOMDBHelper.omdbFile).collect {
Log.e("jingo", "数据安装 $it")
if (it == "finish") {
change(FileDownloadStatus.DONE)
withContext(Dispatchers.Main) {
downloadManager.mapController.layerManagerHandler.omdbLayersUpdate()
downloadManager.mapController.mMapView.updateMap(true)
Log.e("jingo", "数据安装结束,刷新地图")
}
change(FileDownloadStatus.DONE)
} else {
change(FileDownloadStatus.IMPORTING, it)
}