mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Editing a card in a filtered deck show both decks
Currently, when you open a card editor, it shows the card current deck. In case of filtered deck, it shows the filtered deck. The trouble in my opinion is that there is no way to know what is the usual deck of the card. That's extremely useful when I need to move a card to a different deck. The solution I use is to show the current deck and the original deck in parenthesis. This seems to me to be consistent with anki's browser's deck column.
This commit is contained in:
parent
20900641d9
commit
e10b1d703d
@ -577,10 +577,17 @@ public class NoteEditor extends AnkiActivity {
|
||||
for (Deck d : decks) {
|
||||
// add current deck and all other non-filtered decks to deck list
|
||||
long thisDid = d.getLong("id");
|
||||
if (d.getInt("dyn") == 0 || (!mAddNote && mCurrentEditedCard != null && mCurrentEditedCard.getDid() == thisDid)) {
|
||||
deckNames.add(d.getString("name"));
|
||||
mAllDeckIds.add(thisDid);
|
||||
String currentName = d.getString("name");
|
||||
String lineContent = null;
|
||||
if (d.getInt("dyn") == 0) {
|
||||
lineContent = currentName ;
|
||||
} else if (!mAddNote && mCurrentEditedCard != null && mCurrentEditedCard.getDid() == thisDid) {
|
||||
lineContent = getApplicationContext().getString(R.string.current_and_default_deck, currentName, col.getDecks().name(mCurrentEditedCard.getODid()));
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
deckNames.add(lineContent);
|
||||
mAllDeckIds.add(thisDid);
|
||||
}
|
||||
|
||||
ArrayAdapter<String> noteDeckAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, deckNames);
|
||||
|
@ -179,6 +179,7 @@
|
||||
|
||||
<!-- Card Browser Appearance -->
|
||||
<string name="card_template_browser_appearance_title">Browser appearance</string>
|
||||
<string name="current_and_default_deck">%1$s (%2$s)</string>
|
||||
|
||||
<!-- card Info -->
|
||||
<string name="card_info_title">Card info</string>
|
||||
|
Loading…
Reference in New Issue
Block a user