mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-15 19:20:53 -04:00
[LeakCanary] SplashFragment: Early return if onboarding isn't completed
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -39,8 +39,7 @@ import com.aurora.store.viewmodel.auth.AuthViewModel
|
||||
class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
||||
|
||||
private var _binding: FragmentSplashBinding? = null
|
||||
private val binding: FragmentSplashBinding
|
||||
get() = _binding!!
|
||||
private val binding get() = _binding!!
|
||||
|
||||
private val viewModel: AuthViewModel by activityViewModels()
|
||||
|
||||
@@ -48,6 +47,13 @@ class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
_binding = FragmentSplashBinding.bind(view)
|
||||
|
||||
if (!Preferences.getBoolean(requireContext(), PREFERENCE_INTRO)) {
|
||||
findNavController().navigate(
|
||||
SplashFragmentDirections.actionSplashFragmentToOnboardingFragment()
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
binding.imgIcon.load(R.mipmap.ic_launcher) {
|
||||
transformations(RoundedCornersTransformation(32F))
|
||||
}
|
||||
@@ -72,12 +78,6 @@ class SplashFragment : BaseFragment(R.layout.fragment_splash) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!Preferences.getBoolean(requireContext(), PREFERENCE_INTRO)) {
|
||||
findNavController().navigate(
|
||||
SplashFragmentDirections.actionSplashFragmentToOnboardingFragment()
|
||||
)
|
||||
}
|
||||
|
||||
attachActions()
|
||||
|
||||
//Initial status
|
||||
|
||||
Reference in New Issue
Block a user