-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Jetsurvey] fixed app crash on changing date selection #513
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
[Jetsurvey] fixed app crash on changing date selection #513
Conversation
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyFragment.kt
Outdated
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyViewModel.kt
Outdated
Show resolved
Hide resolved
import com.example.compose.jetsurvey.theme.JetsurveyTheme | ||
import com.google.android.material.datepicker.MaterialDatePicker | ||
import java.text.SimpleDateFormat | ||
import java.util.Date |
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.
these imports are no longer needed.
make sure you run spottlessApply
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.
fixed
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.
couple of more small changes
fun onDatePicked(questionId: Int, date: String) { | ||
updateStateWithActionResult(questionId, SurveyActionResult.Date(date)) | ||
fun onDatePicked(questionId: Int, pickerSelection :Long?) { | ||
val selectedData = Date().apply { |
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.
typo - selectedDate
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.
fixed
made date format pattern as a const.
cfadddd
to
b79e679
Compare
@florina-muntenescu , |
I missed this. Thank you @Abhimanyu14 for the changes! |
Fixed the app crash on changing the selected date for the date selection question.
Issue link: #512