Skip to content

updateCards returns the completion page when the card is 0 #10320

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

Closed
IAliceBobI opened this issue Feb 5, 2024 · 4 comments
Closed

updateCards returns the completion page when the card is 0 #10320

IAliceBobI opened this issue Feb 5, 2024 · 4 comments
Assignees
Milestone

Comments

@IAliceBobI
Copy link

IAliceBobI commented Feb 5, 2024

In what scenarios do you need this feature?

目前数量不准确。希望重新统计。或者简单显示插件拦截的数量也行。

另外一个问题是:如果updateCards一个卡都没返回,目前是空白页面+错误的数量统计。

在一个卡都没返回的情况下,希望直接展示全部复习完的那个页面。

@Vanessa219
Copy link
Member

是移除后返回的数量么?这个可能需要自己减去移除的卡片数字。

卡片返回为空会进行以下判断的,要怎么重现空白页?
image

@IAliceBobI
Copy link
Author

IAliceBobI commented Feb 5, 2024

@Vanessa219

数量

我修改过数量,但页面没变化。

空白页

复现也简单:

    async updateCards(options: ICardData) {
        options.cards = [];
        return options;
    }

修改数量不起作用:

    async updateCards(options: ICardData) {
        options.cards = [];
        options.unreviewedCount =0;
        options.unreviewedNewCardCount =0;
        options.unreviewedOldCardCount =0;
        return options;
    }

Vanessa219 added a commit that referenced this issue Feb 5, 2024

Verified

This commit was signed with the committer’s verified signature.
@Vanessa219
Copy link
Member

数字不起作用应该是 #10312 这个问题。空白页可重现。

Vanessa219 added a commit that referenced this issue Feb 5, 2024

Verified

This commit was signed with the committer’s verified signature.
@Vanessa219 Vanessa219 self-assigned this Feb 5, 2024
@Vanessa219 Vanessa219 added this to the 2.12.7 milestone Feb 5, 2024
@Vanessa219 Vanessa219 changed the title 在回调updateCards返回后,重新计算闪卡新卡、旧卡的复习数量 updateCards returns the completion page when the card is 0 Feb 5, 2024
@88250 88250 closed this as completed Feb 6, 2024
@IAliceBobI
Copy link
Author

@Vanessa219 还有一个问题:

alt+0在2.12.7没问题,但 openTab()中打开闪卡,回调参数为null.

async updateCards(options: ICardData) ,options一直是null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants