Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Fix pause toggle (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulapopoola authored and thabti committed Mar 25, 2017
1 parent 8363875 commit b71bb46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Verse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@ class Verse extends Component {
}

handlePlay(verse) {
const { isPlaying, audioActions } = this.props;
const { isPlaying, audioActions, iscurrentVerse } = this.props;
const { pause, setAyah, play } = audioActions;

if (isPlaying) {
pause();
}

if (iscurrentVerse) {
return;
}

setAyah(verse.verseKey);
play();
}
Expand Down

0 comments on commit b71bb46

Please sign in to comment.