Fixed leaks in some fragments
This commit is contained in:
parent
be6b48f8e0
commit
14f31eae37
5 changed files with 18 additions and 1 deletions
|
@ -174,7 +174,7 @@ class SkuDetailsAdapter(
|
|||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||
val skuDetails = skuDetailsList[i]
|
||||
with(viewHolder.binding) {
|
||||
itemTitle.text = skuDetails.title.replace("Retro Music Player MP3 Player", "")
|
||||
itemTitle.text = skuDetails.title.replace("(Retro Music Player MP3 Player)", "")
|
||||
.trim { it <= ' ' }
|
||||
itemText.text = skuDetails.description
|
||||
itemText.isVisible = false
|
||||
|
|
|
@ -154,4 +154,9 @@ class BackupFragment : Fragment(R.layout.fragment_backup), BackupAdapter.BackupC
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
}
|
|
@ -76,6 +76,7 @@ GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
|
|||
}
|
||||
|
||||
|
||||
|
||||
override val titleRes: Int
|
||||
get() = R.string.genres
|
||||
|
||||
|
|
|
@ -425,11 +425,17 @@ class LyricsFragment : AbsMainActivityFragment(R.layout.fragment_lyrics) {
|
|||
super.onPause()
|
||||
updateHelper.stop()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (MusicPlayerRemote.playingQueue.isNotEmpty())
|
||||
(requireActivity() as MainActivity).expandPanel()
|
||||
_binding = null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,6 +101,11 @@ class SettingsFragment : AbsMusicServiceFragment(R.layout.fragment_settings), Co
|
|||
bottom = if (MusicPlayerRemote.playingQueue.isEmpty()) 0 else dip(R.dimen.mini_player_height))
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TAG: String = SettingsFragment::class.java.simpleName
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue