Vanessa 2024-01-06 17:16:40 +08:00
parent 3178f31eb8
commit bc36e67d87

View File

@ -202,6 +202,9 @@ export const bindCardEvent = (options: {
}, (treeCards) => { }, (treeCards) => {
index = 0; index = 0;
options.cardsData = treeCards.data; options.cardsData = treeCards.data;
options.app.plugins.forEach(item => {
item.eventBus.emit("update-cards", options);
});
if (options.cardsData.cards.length > 0) { if (options.cardsData.cards.length > 0) {
nextCard({ nextCard({
countElement, countElement,
@ -416,6 +419,9 @@ export const bindCardEvent = (options: {
}, (result) => { }, (result) => {
index = 0; index = 0;
options.cardsData = result.data; options.cardsData = result.data;
options.app.plugins.forEach(item => {
item.eventBus.emit("update-cards", options);
});
if (options.cardsData.cards.length === 0) { if (options.cardsData.cards.length === 0) {
if (options.cardsData.unreviewedCount > 0) { if (options.cardsData.unreviewedCount > 0) {
newRound(countElement, editor, actionElements, result.data.unreviewedCount); newRound(countElement, editor, actionElements, result.data.unreviewedCount);