修复游戏下载红点更新问题
This commit is contained in:
@ -145,14 +145,15 @@ class DownloadFragment : BaseFragment_TabLayout() {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onEventMainThread(changed: EBDownloadChanged) {
|
||||
if ("download" == changed.type) {
|
||||
updateDownloadHint()
|
||||
// 因为数据库已安装的数据是是比这个回调晚的,所以这里延时500ms
|
||||
postDelayedRunnable({ updateDownloadHint() }, 500L)
|
||||
} else if ("update" == changed.type) {
|
||||
updateUpdateHint()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateDownloadHint() {
|
||||
if (!::mDownloadNumber.isInitialized) return
|
||||
if (!::mDownloadNumber.isInitialized || !isAdded) return
|
||||
|
||||
val downloadData = DownloadManager.getInstance(context).allDownloadEntityExcludeSilentUpdate
|
||||
if (downloadData.size > 0) {
|
||||
|
||||
Reference in New Issue
Block a user