Fix memory leak

This commit is contained in:
inorichi 2017-05-16 14:44:18 +02:00
parent 5914346ace
commit 097d4fe34c

View File

@ -109,7 +109,7 @@ class SettingsDownloadController : SettingsController() {
.subscribeUntilDestroy { isVisible = it } .subscribeUntilDestroy { isVisible = it }
preferences.downloadNewCategories().asObservable() preferences.downloadNewCategories().asObservable()
.subscribe { .subscribeUntilDestroy {
val selectedCategories = it val selectedCategories = it
.mapNotNull { id -> dbCategories.find { it.id == id.toInt() } } .mapNotNull { id -> dbCategories.find { it.id == id.toInt() } }
.sortedBy { it.order } .sortedBy { it.order }