Added new string to all places

This commit is contained in:
Agnieszka C 2021-12-11 17:54:47 +01:00
parent 19e964d3a2
commit c4c990f8bb
3 changed files with 6 additions and 6 deletions

View File

@ -644,7 +644,7 @@ class EditContactActivity : ContactActivity() {
private fun setupContactSource() {
originalContactSource = contact!!.source
getPublicContactSource(contact!!.source) {
contact_source.text = it
contact_source.text = if (it == "") getString(R.string.phone_storage) else it
}
}
@ -653,7 +653,7 @@ class EditContactActivity : ContactActivity() {
originalContactSource = if (hasContactPermissions()) config.lastUsedContactSource else SMT_PRIVATE
contact = getEmptyContact()
getPublicContactSource(contact!!.source) {
contact_source.text = it
contact_source.text = if (it == "") getString(R.string.phone_storage) else it
}
// if the last used contact source is not available anymore, use the first available one. Could happen at ejecting SIM card
@ -663,7 +663,7 @@ class EditContactActivity : ContactActivity() {
originalContactSource = sourceNames.first()
contact?.source = originalContactSource
getPublicContactSource(contact!!.source) {
contact_source.text = it
contact_source.text = if (it == "") getString(R.string.phone_storage) else it
}
}
}
@ -916,7 +916,7 @@ class EditContactActivity : ContactActivity() {
showContactSourcePicker(contact!!.source) {
contact!!.source = if (it == getString(R.string.phone_storage_hidden)) SMT_PRIVATE else it
getPublicContactSource(it) {
contact_source.text = it
contact_source.text = if (it == "") getString(R.string.phone_storage) else it
}
}
}

View File

@ -536,7 +536,7 @@ class ViewContactActivity : ContactActivity() {
for ((key, value) in sources) {
layoutInflater.inflate(R.layout.item_view_contact_source, contact_sources_holder, false).apply {
contact_source.text = value
contact_source.text = if (value == "") getString(R.string.phone_storage) else value
contact_source.copyOnLongClick(value)
contact_sources_holder.addView(this)

View File

@ -42,7 +42,7 @@ class ImportContactsDialog(val activity: SimpleActivity, val path: String, priva
activity.showContactSourcePicker(targetContactSource) {
targetContactSource = if (it == activity.getString(R.string.phone_storage_hidden)) SMT_PRIVATE else it
activity.getPublicContactSource(it) {
import_contacts_title.text = it
import_contacts_title.text = if (it == "") activity.getString(R.string.phone_storage) else it
}
}
}