From 8e0a9d6d665fe8bbd322fc6eb8544ff0bc00a68b Mon Sep 17 00:00:00 2001 From: len Date: Sat, 19 Mar 2016 01:03:28 +0100 Subject: [PATCH] Fix crashes --- .../eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index f471f1b0f..761eccaca 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -124,7 +124,7 @@ class LibraryUpdateService : Service() { * @param startId the start id of this command. * @return the start value of the command. */ - override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { // If there's no network available, set a component to start this service again when // a connection is available. if (!NetworkUtil.isNetworkConnected(this)) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt index f1b6cc0af..d454eb2cd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt @@ -172,7 +172,7 @@ class CatalogueFragment : BaseRxFragment(), FlexibleViewHold spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) val onItemSelected = object : AdapterView.OnItemSelectedListener { - override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) { + override fun onItemSelected(parent: AdapterView<*>, view: View? , position: Int, id: Long) { val source = spinnerAdapter.getItem(position) if (selectedIndex != position || adapter.isEmpty) { // Set previous selection if it's not a valid source and notify the user