Skip to content

Commit

Permalink
Mark chapter completed (#881)
Browse files Browse the repository at this point in the history
Co-authored-by: Rajat Talesra <talesra@talesra-macbookpro.roam.corp.google.com>
  • Loading branch information
rt4914 and Rajat Talesra committed Mar 27, 2020
1 parent 6300d94 commit 7aa9a4c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,10 @@ class StateFragmentPresenter @Inject constructor(
}
}

// TODO(#880): Add test for this button once #495 is merged in develop.
override fun onReturnToTopicButtonClicked() {
hideKeyboard()
markExplorationCompleted()
explorationDataController.stopPlayingExploration()
activity.finish()
}
Expand Down Expand Up @@ -638,7 +640,11 @@ class StateFragmentPresenter @Inject constructor(
}
}

fun markExplorationAsRecentlyPlayed(){
private fun markExplorationAsRecentlyPlayed(){
storyProgressController.recordRecentlyPlayedChapter(profileId,topicId, storyId, explorationId, Date().time)
}

private fun markExplorationCompleted(){
storyProgressController.recordCompletedChapter(profileId,topicId, storyId, explorationId, Date().time)
}
}

0 comments on commit 7aa9a4c

Please sign in to comment.