Repository: corona-warn-app/cwa-app-android
File: Corona-Warn-App/src/main/java/de/rki/coronawarnapp/srs/ui/symptoms/calendar/SrsSymptomsCalendarViewModel.kt (Kotlin)

Code before:
                .reportProblem(tag = TAG, "UI should not allow symptom submission without start date.")
            return
        }
        Timber.tag(TAG).d("onDone() clicked on calender screen.")
        showLoadingIndicator.postValue(true)
        submitSrs()
    }

    private fun submitSrs() = launch {
        resetPreviousSubmissionConsents()
        checkInRepository.updateSubmissionConsents(
            checkInIds = selectedCheckIns.asList(),
            consent = true
        )

        try {
            srsSubmissionRepository.submit(
                submissionType,
                Symptoms(startOfSymptoms = symptomStartInternal.value, symptomIndication = symptomsIndication)
            )
            events.postValue(SrsSymptomsCalendarNavigation.GoToThankYouScreen(submissionType))
        } catch (e: Exception) {
            showLoadingIndicator.postValue(false)
            events.postValue(SrsSymptomsCalendarNavigation.Error(e))
        }
    }

    fun onDone() {
        events.postValue(SrsSymptomsCalendarNavigation.ShowSubmissionWarning)
    }

    fun onLastSevenDaysStart() {
        updateSymptomStart(Symptoms.StartOf.LastSevenDays)
    }

    fun onOneToTwoWeeksAgoStart() {
        updateSymptomStart(Symptoms.StartOf.OneToTwoWeeksAgo)
    }

    fun onMoreThanTwoWeeksStart() {
        updateSymptomStart(Symptoms.StartOf.MoreThanTwoWeeks)
    }

    fun onNoInformationStart() {
        updateSymptomStart(Symptoms.StartOf.NoInformation)
    }

    fun onDateSelected(localDate: LocalDate?) {
        updateSymptomStart(
            localDate?.let {
                Symptoms.StartOf.Date(it)

Review comment (suggestion):
```kotlin 
finally{
    showLoadingIndicator.postValue(false)
}
```

covers both error and when is successfully done 

Code after:
                .reportProblem(tag = TAG, "UI should not allow symptom submission without start date.")
            return
        }
        Timber.tag(TAG).d("onDone() clicked on calender screen.")
        showLoadingIndicator.postValue(true)
        submitSrs()
    }

    private fun submitSrs() = launch {
        resetPreviousSubmissionConsents()
        checkInRepository.updateSubmissionConsents(
            checkInIds = selectedCheckIns.asList(),
            consent = true
        )

        try {
            srsSubmissionRepository.submit(
                submissionType,
                Symptoms(startOfSymptoms = symptomStartInternal.value, symptomIndication = symptomsIndication)
            )
            events.postValue(SrsSymptomsCalendarNavigation.GoToThankYouScreen(submissionType))
        } catch (e: Exception) {
            events.postValue(SrsSymptomsCalendarNavigation.Error(e))
        } finally {
            showLoadingIndicator.postValue(false)
        }
    }

    fun onDone() {
        events.postValue(SrsSymptomsCalendarNavigation.ShowSubmissionWarning)
    }

    fun onLastSevenDaysStart() {
        updateSymptomStart(Symptoms.StartOf.LastSevenDays)
    }

    fun onOneToTwoWeeksAgoStart() {
        updateSymptomStart(Symptoms.StartOf.OneToTwoWeeksAgo)
    }

    fun onMoreThanTwoWeeksStart() {
        updateSymptomStart(Symptoms.StartOf.MoreThanTwoWeeks)
    }

    fun onNoInformationStart() {
        updateSymptomStart(Symptoms.StartOf.NoInformation)
    }

    fun onDateSelected(localDate: LocalDate?) {
        updateSymptomStart(
            localDate?.let {