Skip to content

Marketplace count error #11163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

iamqiz
Copy link
Contributor

@iamqiz iamqiz commented Apr 27, 2024

下图左边是正常的, 右边是异常的
原因是该页面有2个计数元素,上方和中间, 下方通过contentElement.parentElement.querySelector(".counter"); 获取计数元素,
但下方(已安装列表)和上方(更新列表)两者是异步并发创建(fetch), 如果上面的先完成(因为下列表耗时),那么下方获取的计数元素将是上方的计数器,而不是中间的,
因此需要把 parentElement 改成了 previousElementSibling

Clip_2024-04-27_08-15-48

Copy link

Your PR was set to target master, PRs should be target dev
The base branch of this PR has been automatically changed to dev, please check that there are no merge conflicts

@github-actions github-actions bot changed the base branch from master to dev April 27, 2024 00:23
@88250 88250 requested a review from Vanessa219 April 27, 2024 02:19
@Vanessa219
Copy link
Member

右边这个错误是进行什么操作导致的?

@iamqiz
Copy link
Contributor Author

iamqiz commented Apr 27, 2024

@Vanessa219 多次打开设置>集市,然后等待加载完成, 会有一定概率导致右边的情况

@TCOTC
Copy link
Contributor

TCOTC commented Apr 27, 2024

多次打开设置>集市, 会有一定概率导致右边的情况

我一直都是右边的情况。。

原来这个是会分开计数的吗,我还以为只会显示已安装的数量

image

@iamqiz
Copy link
Contributor Author

iamqiz commented Apr 27, 2024

分开计数的,待更新数+ 已安装数

@Vanessa219 Vanessa219 added the Bug label Apr 27, 2024
@Vanessa219 Vanessa219 added this to the 3.0.12 milestone Apr 27, 2024
@Vanessa219 Vanessa219 changed the title fix 集市计数错误 Bazaar count error Apr 27, 2024
@Vanessa219 Vanessa219 merged commit 0e15a50 into siyuan-note:dev Apr 27, 2024
2 checks passed
@88250 88250 changed the title Bazaar count error Marketplace count error Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants