Skip to content
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

fix: currentDeckId broken #17610

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AnkiDroid/src/main/java/com/ichi2/libanki/Card.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ package com.ichi2.libanki
import androidx.annotation.VisibleForTesting
import anki.cards.FsrsMemoryState
import anki.decks.deckId
import anki.notes.noteId
import com.ichi2.anki.Flag
import com.ichi2.anki.utils.ext.ifZero
import com.ichi2.annotations.NeedsTest
import com.ichi2.libanki.Consts.CardQueue
import com.ichi2.libanki.Consts.CardType
import com.ichi2.libanki.TemplateManager.TemplateRenderContext.TemplateRenderOutput
Expand Down Expand Up @@ -233,7 +233,8 @@ open class Card : Cloneable {
}

@LibAnkiAlias("current_deck_id")
fun currentDeckId() = deckId { did = oDid.ifZero { did } }
@NeedsTest("Test functionality which calls this")
fun currentDeckId() = deckId { did = oDid.ifZero { [email protected] } }

/**
* Time limit for answering in milliseconds.
Expand Down
Loading