-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1737: Singleton for exploration to handle input for configuration changes #2514
Closed
FareesHussain
wants to merge
17
commits into
oppia:develop
from
FareesHussain:singleton-for-exploration
Closed
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5cf09d0
issue 2098
FareesHussain d3696f2
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
FareesHussain f3483f8
test commit
FareesHussain e970871
Merge branch 'develop' of https://github.com/FareesHussain/oppia-andr…
FareesHussain 2110cdf
Update gradle.xml
FareesHussain e09a602
Update misc.xml
FareesHussain 38fb39f
Fix gradle.xml
FareesHussain 4c4d22e
Merge branch 'develop' of https://github.com/FareesHussain/oppia-andr…
FareesHussain 1abdd4c
Merge branch 'develop' of https://github.com/FareesHussain/oppia-andr…
FareesHussain ce05cf7
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
FareesHussain 28dee8e
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
FareesHussain b2ce885
Initial implementation
FareesHussain bcfc580
Updated singleton title
FareesHussain 5c60875
Added support for FractionInteractionViewModel.kt
FareesHussain 3205455
Using notifyChange()
FareesHussain baec3c8
Merge branch 'develop' into singleton-for-exploration
BenHenning a3e3da3
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
FareesHussain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
domain/src/main/java/org/oppia/android/domain/state/RetriveUserAnswer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.oppia.android.domain.state | ||
|
||
import org.oppia.android.app.model.UserAnswer | ||
|
||
object RetriveUserAnswer { | ||
// text and error message for fraction [FractionInteractionView.kt] | ||
// list of check boxes as a string and back to check box [SelectionInteractionView.kt] | ||
// text and error msg for [NumericInputInteractionView.kt] | ||
// text and error message for [RatioInputInteractionView.kt] | ||
// text for [TextInputInteractionView.kt] | ||
// list for drag & drop [DragDropSortInteractionView.kt] | ||
// list for drag & drop with merging [DragDropSortInteractionView.kt] | ||
// selected img in the [ImageRegionSelectionInteractionView.kt] | ||
|
||
private var userAnswer: UserAnswer? = null | ||
|
||
fun setUserAnswer(solution: UserAnswer) { | ||
this.userAnswer = solution | ||
} | ||
fun getUserAnswer(): UserAnswer? = userAnswer | ||
|
||
fun clearUserAnswer() { | ||
userAnswer = null | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a Dagger singleton (see other
@Singleton
marked classes in the codebase).