修复游戏卡片快速更新时出现重复标签的问题 https://git.shanqu.cc/pm/halo-app-issues/-/issues/1680
This commit is contained in:
@ -56,7 +56,12 @@ public class GameViewUtils {
|
||||
} else {
|
||||
AppExecutor.getLightWeightIoExecutor().execute(() -> {
|
||||
TextView tv = getNewGameTagView(context, tagEntity, marginRight);
|
||||
AppExecutor.getUiExecutor().execute(() -> labelLayout.addView(tv));
|
||||
AppExecutor.getUiExecutor().execute(() -> {
|
||||
// 快速刷新列表会出现重复标签被添加到布局中的问题,这里在实际执行代码前再检查一次数量
|
||||
if (labelLayout.getChildCount() >= tagEntityList.size()) return;
|
||||
|
||||
labelLayout.addView(tv);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user