mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
show (Deck) when card hasn't been added
This commit is contained in:
parent
ed52a4dc3f
commit
00db72e365
2 changed files with 1 additions and 2 deletions
|
@ -34,7 +34,6 @@ from aqt.utils import (
|
|||
)
|
||||
from aqt.webview import AnkiWebView
|
||||
|
||||
# fixme: deck name on new cards
|
||||
# fixme: card count when removing
|
||||
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ impl Collection {
|
|||
let deck_name: Cow<str> = self
|
||||
.get_deck(if card.odid.0 > 0 { card.odid } else { card.did })?
|
||||
.map(|d| d.human_name().into())
|
||||
.unwrap_or_else(|| "invalid deck".into());
|
||||
.unwrap_or_else(|| "(Deck)".into());
|
||||
let subdeck_name = deck_name.rsplit("::").next().unwrap();
|
||||
map.entry("Subdeck")
|
||||
.or_insert_with(|| subdeck_name.to_string().into());
|
||||
|
|
Loading…
Reference in a new issue