|
@@ -26,7 +26,7 @@ class SoundRecordFragment : BaseFragment<FragmentSoundRecordBinding>() {
|
|
|
private var playVoice: PlayVoice? = null
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
- questionId = arguments?.getInt("questionId") ?: 4
|
|
|
+ questionId = arguments?.getInt("questionId") ?: 11
|
|
|
super.onCreate(savedInstanceState)
|
|
|
}
|
|
|
|
|
@@ -77,19 +77,19 @@ class SoundRecordFragment : BaseFragment<FragmentSoundRecordBinding>() {
|
|
|
*/
|
|
|
private fun loadData() {
|
|
|
if (dao != null) {
|
|
|
- if (questionId == 11) {
|
|
|
- val firstquestion = dao?.getQuestion(questionId)
|
|
|
- if (firstquestion != null) {
|
|
|
- firstWord = firstquestion.reviewItem
|
|
|
- }
|
|
|
- val secondQuestion = dao?.getQuestion(12)
|
|
|
- if (secondQuestion != null) {
|
|
|
- secondWord = secondQuestion.reviewItem
|
|
|
- }
|
|
|
- val thirdQuestion = dao?.getQuestion(13)
|
|
|
- if (thirdQuestion != null) {
|
|
|
- thirdWord = thirdQuestion.reviewItem
|
|
|
- }
|
|
|
+ val firstquestion = dao?.getQuestion(questionId)
|
|
|
+ if (firstquestion != null) {
|
|
|
+ firstWord = firstquestion.reviewItem
|
|
|
+ }
|
|
|
+ val secondQuestionnId = questionId + 1
|
|
|
+ val secondQuestion = dao?.getQuestion(secondQuestionnId)
|
|
|
+ if (secondQuestion != null) {
|
|
|
+ secondWord = secondQuestion.reviewItem
|
|
|
+ }
|
|
|
+ val thirdQuestionId = questionId + 2
|
|
|
+ val thirdQuestion = dao?.getQuestion(thirdQuestionId)
|
|
|
+ if (thirdQuestion != null) {
|
|
|
+ thirdWord = thirdQuestion.reviewItem
|
|
|
}
|
|
|
}
|
|
|
}
|