removed unused variable
This commit is contained in:
@@ -42,7 +42,6 @@ class ContactListAdapter(private val cxt: Context, private val rows: ArrayList<S
|
|||||||
deleteDialog.setPositiveButton("Delete") { dialog, _ ->
|
deleteDialog.setPositiveButton("Delete") { dialog, _ ->
|
||||||
ContactsActivity.contactNames.removeAt(position)
|
ContactsActivity.contactNames.removeAt(position)
|
||||||
ContactsActivity.contactURIs.removeAt(position)
|
ContactsActivity.contactURIs.removeAt(position)
|
||||||
ContactsActivity.posAtContacts.removeAt(position)
|
|
||||||
ContactsActivity.saveContacts()
|
ContactsActivity.saveContacts()
|
||||||
this.notifyDataSetChanged()
|
this.notifyDataSetChanged()
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class ContactsActivity : AppCompatActivity() {
|
|||||||
newNameView.clearFocus()
|
newNameView.clearFocus()
|
||||||
contactNames.add(name)
|
contactNames.add(name)
|
||||||
contactURIs.add("")
|
contactURIs.add("")
|
||||||
posAtContacts.add(contactNames.size)
|
|
||||||
clAdapter.notifyDataSetChanged()
|
clAdapter.notifyDataSetChanged()
|
||||||
saveContacts()
|
saveContacts()
|
||||||
val i = Intent(this, ContactActivity::class.java)
|
val i = Intent(this, ContactActivity::class.java)
|
||||||
@@ -80,15 +79,12 @@ class ContactsActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
var contactNames = ArrayList<String>()
|
var contactNames = ArrayList<String>()
|
||||||
var contactURIs = ArrayList<String>()
|
var contactURIs = ArrayList<String>()
|
||||||
var posAtContacts = ArrayList<Int>()
|
|
||||||
|
|
||||||
fun generateContacts(path: String) {
|
fun generateContacts(path: String) {
|
||||||
val content = Utils.getFileContents(File(path))
|
val content = Utils.getFileContents(File(path))
|
||||||
MainActivity.contacts_remove()
|
MainActivity.contacts_remove()
|
||||||
contactNames.clear()
|
contactNames.clear()
|
||||||
contactURIs.clear()
|
contactURIs.clear()
|
||||||
posAtContacts.clear()
|
|
||||||
var i = 0
|
|
||||||
content.lines().forEach {
|
content.lines().forEach {
|
||||||
val parts = it.split("\"")
|
val parts = it.split("\"")
|
||||||
if (parts.size == 3) {
|
if (parts.size == 3) {
|
||||||
@@ -97,7 +93,6 @@ class ContactsActivity : AppCompatActivity() {
|
|||||||
MainActivity.contact_add("\"$name\" $uri")
|
MainActivity.contact_add("\"$name\" $uri")
|
||||||
contactNames.add(name)
|
contactNames.add(name)
|
||||||
contactURIs.add(uri)
|
contactURIs.add(uri)
|
||||||
posAtContacts.add(i++)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ class HistoryActivity : AppCompatActivity() {
|
|||||||
else
|
else
|
||||||
ContactsActivity.contactURIs.add("sip:${uaHistory[pos].peerURI}" +
|
ContactsActivity.contactURIs.add("sip:${uaHistory[pos].peerURI}" +
|
||||||
"@" + uaHistory[pos].peerDomain)
|
"@" + uaHistory[pos].peerDomain)
|
||||||
ContactsActivity.posAtContacts.add(ContactsActivity.contactNames.size)
|
|
||||||
ContactsActivity.saveContacts()
|
ContactsActivity.saveContacts()
|
||||||
val i = Intent(this, ContactActivity::class.java)
|
val i = Intent(this, ContactActivity::class.java)
|
||||||
val b = Bundle()
|
val b = Bundle()
|
||||||
|
|||||||
Reference in New Issue
Block a user