Add isAdded check in AdditionalLessonAddDialog (#2515)

This commit is contained in:
Rafał Borcz 2024-04-08 20:51:05 +02:00 committed by GitHub
parent b500d8e204
commit 7a3a97447f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,7 +155,9 @@ class AdditionalLessonAddDialog : BaseDialogFragment<DialogAdditionalAddBinding>
.build() .build()
timePicker.addOnPositiveButtonClickListener { timePicker.addOnPositiveButtonClickListener {
onTimeSelected(LocalTime.of(timePicker.hour, timePicker.minute)) if (isAdded) {
onTimeSelected(LocalTime.of(timePicker.hour, timePicker.minute))
}
} }
if (!parentFragmentManager.isStateSaved) { if (!parentFragmentManager.isStateSaved) {