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

Code before:
        Timber.tag(TAG).d("Mark risk badge as seen")
        tracingSettings.updateShowRiskLevelBadge(show = false)
    }

    private val testsData = combine(
        coronaTestRepository.coronaTests,
        familyTestRepository.familyTests,
        appConfigProvider.currentConfig.map { it.coronaTestParameters }.distinctUntilChanged(),
    ) { coronaTests, familyTests, coronaTestParameters ->
        TestsData(
            coronaTests = coronaTests,
            familyTests = familyTests,
            coronaTestParameters = coronaTestParameters
        )
    }

    val homeItems: LiveData<List<HomeItem>> = combine(
        testsData,
        tracingCardItems,
        combinedStatisticsProvider.statistics,
        rampDownDataProvider.rampDownNotice,
    ) { testsData, tracingItem, statsData, rampDownNotice ->
        mutableListOf<HomeItem>().apply {
            Timber.d("rampDownNotice=%s", rampDownNotice)
            if (rampDownNotice?.visible == true) {
                addEolCard(rampDownNotice)
            }
            addRiskLevelCard(tracingItem)
            addIncompatibleCard()
            addTestCards(
                testsData.coronaTests.latestOf<PCRCoronaTest>(),
                testsData.coronaTests.latestOf<RACoronaTest>(),
                testsData.coronaTestParameters,
                testsData.familyTests
            )
            addStatisticsCard(statsData)
            addTraceLocationCard()
            addFaqCard()
        }
    }.distinctUntilChanged().asLiveData2()

    fun errorResetDialogDismissed() = launch {
        errorResetTool.updateIsResetNoticeToBeShown(false)
    }

    fun refreshTests() = launch {
        try {
            submissionRepository.refreshTest()
            familyTestRepository.refresh()
        } catch (e: CoronaTestNotFoundException) {
            Timber.e(e, "refreshTest failed")

Review comment (suggestion):
Please rename to `addRampDownCard` I know I did not like that at the beginning ,but to avoid confusion about EOL (End Of Life) I used the same term as in specs 

Code after:
        Timber.tag(TAG).d("Mark risk badge as seen")
        tracingSettings.updateShowRiskLevelBadge(show = false)
    }

    private val testsData = combine(
        coronaTestRepository.coronaTests,
        familyTestRepository.familyTests,
        appConfigProvider.currentConfig.map { it.coronaTestParameters }.distinctUntilChanged(),
    ) { coronaTests, familyTests, coronaTestParameters ->
        TestsData(
            coronaTests = coronaTests,
            familyTests = familyTests,
            coronaTestParameters = coronaTestParameters
        )
    }

    val homeItems: LiveData<List<HomeItem>> = combine(
        testsData,
        tracingCardItems,
        combinedStatisticsProvider.statistics,
        rampDownDataProvider.rampDownNotice,
    ) { testsData, tracingItem, statsData, rampDownNotice ->
        mutableListOf<HomeItem>().apply {
            Timber.d("rampDownNotice=%s", rampDownNotice)
            if (rampDownNotice?.visible == true) {
                addRampDownCard(rampDownNotice)
            }
            addRiskLevelCard(tracingItem)
            addIncompatibleCard()
            addTestCards(
                testsData.coronaTests.latestOf<PCRCoronaTest>(),
                testsData.coronaTests.latestOf<RACoronaTest>(),
                testsData.coronaTestParameters,
                testsData.familyTests
            )
            addStatisticsCard(statsData)
            addTraceLocationCard()
            addFaqCard()
        }
    }.distinctUntilChanged().asLiveData2()

    fun errorResetDialogDismissed() = launch {
        errorResetTool.updateIsResetNoticeToBeShown(false)
    }

    fun refreshTests() = launch {
        try {
            submissionRepository.refreshTest()
            familyTestRepository.refresh()
        } catch (e: CoronaTestNotFoundException) {
            Timber.e(e, "refreshTest failed")