Skip to content

Commit

Permalink
Fix crashing rewind
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Aug 10, 2023
1 parent dcef585 commit 4563021
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class GeneralSpeakTextProvider(
val lastTitle = this.lastVerseWithTitle
reset()
val rewindAmount = amount?: SpeakSettings.RewindAmount.SMART
val minimumOrdinal = book.ordinalRangeFor(startKey).first
val minimumOrdinal = book.ordinalRangeFor(startKey.key).first

when(rewindAmount) {
SpeakSettings.RewindAmount.SMART -> {
Expand Down Expand Up @@ -410,12 +410,8 @@ class GeneralSpeakTextProvider(
reset()
val rewindAmount = amount?: SpeakSettings.RewindAmount.SMART
when(rewindAmount) {
SpeakSettings.RewindAmount.SMART -> {
currentKey = getNextKey(startKey)

}
SpeakSettings.RewindAmount.ONE_VERSE ->
currentKey = getNextOrdinal(startKey)
SpeakSettings.RewindAmount.SMART -> currentKey = startKey.next
SpeakSettings.RewindAmount.ONE_VERSE -> currentKey = getNextOrdinal(startKey)
SpeakSettings.RewindAmount.TEN_VERSES -> {
currentKey = startKey
for (i in 1..10) {
Expand Down

0 comments on commit 4563021

Please sign in to comment.