From 47bae051eef0b5ec41cb553e9382f0eabbcb1dcf Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 11 Jul 2024 18:53:46 +0200 Subject: [PATCH] chore: remove no longer needed safe dot calls --- .../libretube/ui/activities/WelcomeActivity.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/activities/WelcomeActivity.kt b/app/src/main/java/com/github/libretube/ui/activities/WelcomeActivity.kt index 9bd0c02a7..f0d9d98b9 100644 --- a/app/src/main/java/com/github/libretube/ui/activities/WelcomeActivity.kt +++ b/app/src/main/java/com/github/libretube/ui/activities/WelcomeActivity.kt @@ -48,17 +48,17 @@ class WelcomeActivity : BaseActivity() { // ALl the binding values are optional due to two different possible layouts (normal, landscape) viewModel.instances.observe(this) { instances -> - binding.instancesRecycler?.layoutManager = LinearLayoutManager(this@WelcomeActivity) - binding.instancesRecycler?.adapter = InstancesAdapter(instances, viewModel.selectedInstanceIndex.value) { index -> + binding.instancesRecycler.layoutManager = LinearLayoutManager(this@WelcomeActivity) + binding.instancesRecycler.adapter = InstancesAdapter(instances, viewModel.selectedInstanceIndex.value) { index -> viewModel.selectedInstanceIndex.value = index - binding.okay?.alpha = 1f + binding.okay.alpha = 1f } - binding.progress?.isGone = true + binding.progress.isGone = true } viewModel.fetchInstances() - binding.okay?.alpha = if (viewModel.selectedInstanceIndex.value != null) 1f else 0.5f - binding.okay?.setOnClickListener { + binding.okay.alpha = if (viewModel.selectedInstanceIndex.value != null) 1f else 0.5f + binding.okay.setOnClickListener { if (viewModel.selectedInstanceIndex.value != null) { val selectedInstance = viewModel.instances.value!![viewModel.selectedInstanceIndex.value!!] @@ -69,7 +69,7 @@ class WelcomeActivity : BaseActivity() { } } - binding.restore?.setOnClickListener { + binding.restore.setOnClickListener { restoreFilePicker.launch(BackupRestoreSettings.JSON) } }