Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Remove Activity.goBack() (DEV) #4637

Merged
merged 4 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,4 @@ class OnboardingActivity : AppCompatActivity(), LifecycleObserver, HasAndroidInj
MainActivity.start(this, intent)
finish()
}

fun goBack() {
onBackPressed()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import de.rki.coronawarnapp.databinding.FragmentOnboardingPrivacyBinding
import de.rki.coronawarnapp.util.di.AutoInject
import de.rki.coronawarnapp.util.ui.doNavigate
import de.rki.coronawarnapp.util.ui.observe2
import de.rki.coronawarnapp.util.ui.popBackStack
import de.rki.coronawarnapp.util.ui.viewBinding
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactoryProvider
import de.rki.coronawarnapp.util.viewmodel.cwaViewModels
Expand Down Expand Up @@ -36,8 +37,7 @@ class OnboardingPrivacyFragment : Fragment(R.layout.fragment_onboarding_privacy)
OnboardingPrivacyFragmentDirections
.actionOnboardingPrivacyFragmentToOnboardingTracingFragment()
)
is OnboardingNavigationEvents.NavigateToOnboardingFragment ->
(activity as OnboardingActivity).goBack()
is OnboardingNavigationEvents.NavigateToOnboardingFragment -> popBackStack()
else -> Unit
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import de.rki.coronawarnapp.databinding.FragmentOnboardingTestBinding
import de.rki.coronawarnapp.util.di.AutoInject
import de.rki.coronawarnapp.util.ui.doNavigate
import de.rki.coronawarnapp.util.ui.observe2
import de.rki.coronawarnapp.util.ui.popBackStack
import de.rki.coronawarnapp.util.ui.viewBinding
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactoryProvider
import de.rki.coronawarnapp.util.viewmodel.cwaViewModels
Expand Down Expand Up @@ -36,8 +37,7 @@ class OnboardingTestFragment : Fragment(R.layout.fragment_onboarding_test), Auto
OnboardingTestFragmentDirections
.actionOnboardingTestFragmentToOnboardingNotificationsFragment()
)
is OnboardingNavigationEvents.NavigateToOnboardingTracing ->
(activity as OnboardingActivity).goBack()
is OnboardingNavigationEvents.NavigateToOnboardingTracing -> popBackStack()

else -> Unit
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import de.rki.coronawarnapp.ui.doNavigate
import de.rki.coronawarnapp.util.DialogHelper
import de.rki.coronawarnapp.util.di.AutoInject
import de.rki.coronawarnapp.util.ui.observe2
import de.rki.coronawarnapp.util.ui.popBackStack
import de.rki.coronawarnapp.util.ui.viewBinding
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactoryProvider
import de.rki.coronawarnapp.util.viewmodel.cwaViewModels
Expand Down Expand Up @@ -56,8 +57,7 @@ class OnboardingTracingFragment : Fragment(R.layout.fragment_onboarding_tracing)
}
)
)
is OnboardingNavigationEvents.NavigateToOnboardingPrivacy ->
(requireActivity() as OnboardingActivity).goBack()
is OnboardingNavigationEvents.NavigateToOnboardingPrivacy -> popBackStack()

else -> Unit
}
Expand Down