fix: 修复部分页面顶部下载按钮红点和数字显示不正确的问题

This commit is contained in:
chenjuntao
2022-09-16 16:51:56 +08:00
parent 552da837c1
commit 2bd3990404
3 changed files with 1 additions and 27 deletions

View File

@ -6,7 +6,6 @@ import android.view.MenuItem
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.gh.download.DownloadManager
import com.gh.gamecenter.DownloadManagerActivity
import com.gh.gamecenter.R
@ -72,7 +71,7 @@ abstract class DownloadToolbarActivity : ToolBarActivity() {
}
private fun updateDownloadCountHint(updateList: List<GameUpdateEntity>?) {
if (mDownloadCountHint == null || updateList.isNullOrEmpty()) return
if (mDownloadCountHint == null) return
val count = DownloadManager.getInstance().getDownloadOrUpdateCount(updateList)
if (count != null) {
mDownloadCountHint!!.visibility = View.VISIBLE