mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 15:16:04 +03:00
Fix crashes
This commit is contained in:
parent
b8bc3476f4
commit
8e0a9d6d66
2 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
|
@ -172,7 +172,7 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), 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
|
||||
|
|
Loading…
Reference in a new issue