Merge pull request #81 from vikulin/master

1. ? condition fix after Kotlin upgrade
This commit is contained in:
Vadym Vikulin 2022-11-25 16:20:14 +02:00 committed by GitHub
commit d6ac6fcca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -117,8 +117,8 @@ class DNSListActivity : AppCompatActivity() {
val item = menu.findItem(R.id.saveItem) as MenuItem
item.setActionView(R.layout.menu_save)
val saveButton = item
.actionView.findViewById<Button>(R.id.saveButton)
saveButton.setOnClickListener {
.actionView?.findViewById<Button>(R.id.saveButton)
saveButton?.setOnClickListener {
if(isLoading){
return@setOnClickListener
}

View File

@ -339,8 +339,8 @@ class PeerListActivity : AppCompatActivity() {
val item = menu.findItem(R.id.saveItem) as MenuItem
item.setActionView(R.layout.menu_save)
val saveButton = item
.actionView.findViewById<Button>(R.id.saveButton)
saveButton.setOnClickListener {
.actionView?.findViewById<Button>(R.id.saveButton)
saveButton?.setOnClickListener {
saveButton.isClickable = false
cancelPeerListPing()
val result = Intent(this, MainActivity::class.java)
@ -354,8 +354,8 @@ class PeerListActivity : AppCompatActivity() {
val editUrl = menu.findItem(R.id.editUrlItem) as MenuItem
editUrl.setActionView(R.layout.menu_edit_url)
val editUrlButton = editUrl
.actionView.findViewById<Button>(R.id.editUrlButton)
editUrlButton.setOnClickListener {
.actionView?.findViewById<Button>(R.id.editUrlButton)
editUrlButton?.setOnClickListener {
editPeerListUrl()
}
return true