Fix LoadingFragment memory leak

Fix an issue where a memory leak would occur in LoadingFragment if it exited before it was visible to the user.
This commit is contained in:
OxygenCobalt 2021-01-18 08:22:05 -07:00
parent 1e102e9d5d
commit 2889e6fdfd
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -110,7 +110,9 @@ class LoadingFragment : Fragment(R.layout.fragment_loading) {
return binding.root return binding.root
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onStart() {
super.onStart()
// If the music was already loaded, then don't do it again. // If the music was already loaded, then don't do it again.
if (MusicStore.getInstance().loaded) { if (MusicStore.getInstance().loaded) {
findNavController().navigate( findNavController().navigate(