mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #6220 from Bnyro/master
chore: remove no longer needed safe dot calls
This commit is contained in:
commit
aaa9792001
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user