summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-11-05 20:03:24 +0100
committerJules Laplace <julescarbon@gmail.com>2020-11-05 20:03:24 +0100
commitd5d6b6c5cff095fb39bf2fff24445451b25bd53b (patch)
tree9391a269c1d169e1132738fb410e1119c0212a2d /animism-align/frontend/app/views/viewer/viewer.actions.js
parent0387bd453274e0bfd7d085a4fae26b5260a9f823 (diff)
read the transcript at end of first section
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js
index 449d224..e35567d 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -293,8 +293,12 @@ export const showCredits = () => dispatch => {
export const reachedEndOfSection = currentSection => dispatch => {
actions.audio.pause()
dispatch({ type: types.viewer.reached_end_of_section })
- if (currentSection && currentSection.index === 0) {
- actions.viewer.openGrowl(GROWL.REACHED_END_OF_FIRST_SECTION)
+ if (currentSection) {
+ // reached end of first section
+ if (currentSection.index === 0) {
+ actions.viewer.openGrowl(GROWL.REACHED_END_OF_FIRST_SECTION)
+ }
+ // reached end of last section
}
}