Minor fixes regarding leaks
This commit is contained in:
@@ -169,13 +169,13 @@ class LibraryController(
|
||||
activeCategory = it
|
||||
updateTitle()
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
getColumnsPreferenceForCurrentOrientation().asImmediateFlow { mangaPerRow = it }
|
||||
.drop(1)
|
||||
// Set again the adapter to recalculate the covers height
|
||||
.onEach { reattachAdapter() }
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
if (selectedMangas.isNotEmpty()) {
|
||||
createActionModeIfNeeded()
|
||||
@@ -197,7 +197,7 @@ class LibraryController(
|
||||
GlobalSearchController(query).withFadeTransaction()
|
||||
)
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
(activity!! as MainActivity).fixViewToBottom(binding.actionToolbar)
|
||||
}
|
||||
@@ -212,6 +212,7 @@ class LibraryController(
|
||||
|
||||
override fun onDestroyView(view: View) {
|
||||
destroyActionModeIfNeeded()
|
||||
(activity!! as MainActivity).clearFixViewToBottom(binding.actionToolbar)
|
||||
binding.actionToolbar.destroy()
|
||||
adapter?.onDestroy()
|
||||
adapter = null
|
||||
@@ -391,7 +392,7 @@ class LibraryController(
|
||||
query = it.toString()
|
||||
performSearch()
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
|
||||
private fun performSearch() {
|
||||
|
||||
Reference in New Issue
Block a user