Add isAdded condition to HomeworkAddDialog (#2499)

This commit is contained in:
Rafał Borcz 2024-03-24 14:55:05 +01:00 committed by GitHub
parent b280316b07
commit a0818de7d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,9 @@ class HomeworkAddDialog : BaseDialogFragment<DialogHomeworkAddBinding>(), Homewo
rangeEnd = LocalDate.now().lastSchoolDayInSchoolYear,
onDateSelected = {
date = it
binding.homeworkDialogDate.editText?.setText(date!!.toFormattedString())
if (isAdded) {
binding.homeworkDialogDate.editText?.setText(date!!.toFormattedString())
}
}
)
}