From 097d4fe34c09740f3cd858efd57f4ec2114e5369 Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 16 May 2017 14:44:18 +0200 Subject: [PATCH] Fix memory leak --- .../kanade/tachiyomi/ui/setting/SettingsDownloadController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt index e1fa81e5e..39485d6ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt @@ -109,7 +109,7 @@ class SettingsDownloadController : SettingsController() { .subscribeUntilDestroy { isVisible = it } preferences.downloadNewCategories().asObservable() - .subscribe { + .subscribeUntilDestroy { val selectedCategories = it .mapNotNull { id -> dbCategories.find { it.id == id.toInt() } } .sortedBy { it.order }