finish custom srs for now
This commit is contained in:
@@ -31,6 +31,17 @@ class CustomDeckRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateCards(List<CustomKanjiItem> itemsToUpdate) async {
|
||||
final deck = await getCustomDeck();
|
||||
for (var item in itemsToUpdate) {
|
||||
final index = deck.indexWhere((element) => element.characters == item.characters);
|
||||
if (index != -1) {
|
||||
deck[index] = item;
|
||||
}
|
||||
}
|
||||
await saveDeck(deck);
|
||||
}
|
||||
|
||||
Future<void> deleteCard(CustomKanjiItem item) async {
|
||||
final deck = await getCustomDeck();
|
||||
deck.removeWhere((element) => element.characters == item.characters);
|
||||
|
||||
Reference in New Issue
Block a user