Skip to content

Commit

Permalink
Fix ArrayOutOfBounds exception
Browse files Browse the repository at this point in the history
  • Loading branch information
teresaholfeld committed Jun 20, 2019
1 parent 6695bea commit 506e390
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ class StoriesProgressView : LinearLayout {
* Skip current story
*/
fun skip() {
// if (wasSkippedForward || wasSkippedBackward) return
// if (isComplete) return
if (current >= progressBars.size) return
if (current >= progressBars.size || current < 0) return
val p = progressBars[current]
wasSkippedForward = true
wasSkippedBackward = false
Expand All @@ -129,8 +127,6 @@ class StoriesProgressView : LinearLayout {
* Reverse current story
*/
fun reverse() {
// if (wasSkippedForward || wasSkippedBackward) return
// if (isComplete) return
if (current < 0) return
val p = progressBars[current]
wasSkippedBackward = true
Expand Down

0 comments on commit 506e390

Please sign in to comment.