Shuffle individual decks for flash cards

This commit is contained in:
Avery Pace 2021-11-08 12:42:03 -05:00
parent 0051d4942d
commit 8ef735d004

View File

@ -36,7 +36,8 @@ struct FlashCardView: View {
func getDictionary() -> [TokiDictEntry] { func getDictionary() -> [TokiDictEntry] {
if dictionary != nil { if dictionary != nil {
return dictionary ?? [] dictionary?.shuffle()
return dictionary ?? []
} else { } else {
return flashCardsViewModel.randomDictionary return flashCardsViewModel.randomDictionary
} }
@ -114,7 +115,7 @@ struct FlashCardStack: View {
flashCardsVertOffset[currentFlashCard + 1] = 310 flashCardsVertOffset[currentFlashCard + 1] = 310
} }
flashCardsVertOffset[currentFlashCard] = 100 flashCardsVertOffset[currentFlashCard] = 50
flashCardsAreInteractive[currentFlashCard] = true flashCardsAreInteractive[currentFlashCard] = true
} }
@ -172,7 +173,7 @@ struct FlashCardStack: View {
if(currentFlashCard > 0 ) { if(currentFlashCard > 0 ) {
flashCardsVertOffset[currentFlashCard - 1] = -1000 flashCardsVertOffset[currentFlashCard - 1] = -1000
} }
flashCardsVertOffset[currentFlashCard] = 100 flashCardsVertOffset[currentFlashCard] = 50
flashCardsAreInteractive[currentFlashCard] = true flashCardsAreInteractive[currentFlashCard] = true
self.fadeOutOverlay = true self.fadeOutOverlay = true