From 575f3cb56b7f39e1c5c318f342eb7e6f1538e58c Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Fri, 23 Sep 2022 19:36:06 -0700 Subject: [PATCH] Fix broken view models. --- .../MarkChaptersCompletedFragmentPresenter.kt | 2 +- .../MarkStoriesCompletedFragmentPresenter.kt | 2 +- .../marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt index 65fb174dc5c..8784bf351fd 100644 --- a/app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt @@ -79,7 +79,7 @@ class MarkChaptersCompletedFragmentPresenter @Inject constructor( } } else if (binding.isAllChecked == true) { binding.isAllChecked = false - getMarkChaptersCompletedViewModel().getItemList().forEach { viewModel -> + viewModel.getItemList().forEach { viewModel -> if (viewModel is ChapterSummaryViewModel) { if (!viewModel.checkIfChapterIsCompleted()) { chapterUnselected(viewModel.chapterIndex, viewModel.nextStoryIndex) diff --git a/app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragmentPresenter.kt index 91c61fde9b6..f6c98598418 100644 --- a/app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragmentPresenter.kt @@ -77,7 +77,7 @@ class MarkStoriesCompletedFragmentPresenter @Inject constructor( storySelected(viewModel.storySummary.storyId) } } else { - getMarkStoriesCompletedViewModel().getStorySummaryMap().values.forEach { viewModel -> + viewModel.getStorySummaryMap().values.forEach { viewModel -> if (!viewModel.isCompleted) storyUnselected(viewModel.storySummary.storyId) } } diff --git a/app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt index 4fdb5d0d5c7..6d80cb32dd3 100644 --- a/app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt @@ -72,7 +72,7 @@ class MarkTopicsCompletedFragmentPresenter @Inject constructor( if (!viewModel.isCompleted) topicSelected(viewModel.topic.topicId) } } else { - getMarkTopicsCompletedViewModel().getTopicList().forEach { viewModel -> + viewModel.getTopicList().forEach { viewModel -> if (!viewModel.isCompleted) topicUnselected(viewModel.topic.topicId) } }