修改 下载/更新 红点提示逻辑

This commit is contained in:
kehaoyuan
2019-12-17 16:16:20 +08:00
parent a149666d3a
commit 07e54d5b5e
11 changed files with 189 additions and 102 deletions

View File

@ -193,10 +193,10 @@ public abstract class ToolBarActivity extends BaseActivity implements ToolbarCon
private void updateDownloadCountHint(List<GameUpdateEntity> updateList) {
if (mDownloadCountHint == null) return;
int count = DownloadManager.getInstance(getApplicationContext()).getDownloadOrUpdateCount(updateList);
if (count != 0) {
String count = DownloadManager.getInstance(getApplicationContext()).getDownloadOrUpdateCount(updateList);
if (count != null) {
mDownloadCountHint.setVisibility(View.VISIBLE);
mDownloadCountHint.setText(String.valueOf(count));
mDownloadCountHint.setText(count);
} else {
mDownloadCountHint.setVisibility(View.GONE);
}