- Removed unnecessary string conversions.

This commit is contained in:
Juha Heinanen
2019-05-08 13:53:32 +03:00
parent adbf62ad7d
commit 64d96a10d7
4 changed files with 5 additions and 6 deletions

View File

@ -14,8 +14,7 @@ class AboutActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about)
val aboutText = findViewById(R.id.aboutText) as TextView
aboutText.text = String.format(getText(R.string.about_text).toString(),
BuildConfig.VERSION_NAME)
aboutText.text = String.format(getString(R.string.about_text), BuildConfig.VERSION_NAME)
aboutText.setTextColor(Color.BLACK)
}

View File

@ -430,7 +430,7 @@ class AccountActivity : AppCompatActivity() {
}
findViewById(R.id.DefaultTitle) as TextView -> {
Utils.alertView(this, getString(R.string.default_account),
getText(R.string.default_account_help).toString())
getString(R.string.default_account_help))
}
}
}

View File

@ -100,7 +100,7 @@ class ChatActivity : AppCompatActivity() {
}
val builder = AlertDialog.Builder(this@ChatActivity, R.style.Theme_AppCompat)
if (ContactsActivity.contactName(peerUri) == peerUri)
builder.setMessage(String.format(getText(R.string.long_message_question).toString(),
builder.setMessage(String.format(getString(R.string.long_message_question),
chatPeer))
.setPositiveButton(getString(R.string.cancel), dialogClickListener)
.setNegativeButton(getString(R.string.delete_message), dialogClickListener)

View File

@ -602,8 +602,8 @@ class MainActivity : AppCompatActivity() {
"registering failed" -> {
uaAdapter.notifyDataSetChanged()
Toast.makeText(applicationContext,
String.format(getText(R.string.registering_failed).toString(),
aor) + ": ${ev[1]}",
String.format(getString(R.string.registering_failed), aor) +
": ${ev[1]}",
Toast.LENGTH_LONG).show()
}
"call ringing" -> {