Minor fixes regarding leaks
This commit is contained in:
@@ -67,7 +67,7 @@ open class ExtensionController :
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
binding.swipeRefresh.refreshes()
|
||||
.onEach { presenter.findAvailableExtensions() }
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
// Initialize adapter, scroll listener and recycler views
|
||||
adapter = ExtensionAdapter(this)
|
||||
@@ -142,7 +142,7 @@ open class ExtensionController :
|
||||
query = it.toString()
|
||||
drawExtensions()
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
|
||||
override fun onItemClick(view: View, position: Int): Boolean {
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||
isChecked = enabled
|
||||
sourcePrefs.forEach { pref -> pref.isVisible = enabled }
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
|
||||
// Source enable/disable
|
||||
|
||||
@@ -222,7 +222,7 @@ class SourceController :
|
||||
searchView.queryTextEvents()
|
||||
.filterIsInstance<QueryTextEvent.QuerySubmitted>()
|
||||
.onEach { performGlobalSearch(it.queryText.toString()) }
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
|
||||
private fun performGlobalSearch(query: String) {
|
||||
|
||||
+3
-2
@@ -187,6 +187,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
}
|
||||
|
||||
override fun cleanupFab(fab: ExtendedFloatingActionButton) {
|
||||
fab.setOnClickListener(null)
|
||||
actionFabScrollListener?.let { recycler?.removeOnScrollListener(it) }
|
||||
actionFab = null
|
||||
}
|
||||
@@ -224,7 +225,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
.drop(1)
|
||||
// Set again the adapter to recalculate the covers height
|
||||
.onEach { adapter = this@BrowseSourceController.adapter }
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
(layoutManager as GridLayoutManager).spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
override fun getSpanSize(position: Int): Int {
|
||||
@@ -275,7 +276,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
.filter { router.backstack.lastOrNull()?.controller() == this@BrowseSourceController }
|
||||
.filterIsInstance<QueryTextEvent.QuerySubmitted>()
|
||||
.onEach { searchWithQuery(it.queryText.toString()) }
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
|
||||
searchItem.fixExpand(
|
||||
onExpand = { invalidateMenuOnExpand() },
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ open class GlobalSearchController(
|
||||
searchItem.collapseActionView()
|
||||
setTitle() // Update toolbar title
|
||||
}
|
||||
.launchIn(scope)
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user