From f07abeb54c9d49c6beb6cc0e78831fe0470518de Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 03:19:50 +0530 Subject: [PATCH 01/20] Add vCard attachment preview --- app/build.gradle | 1 + app/src/main/AndroidManifest.xml | 6 + .../activities/VCardViewerActivity.kt | 81 +++++++ .../smsmessenger/adapters/ThreadAdapter.kt | 223 +++++++++++------- .../adapters/VCardViewerAdapter.kt | 138 +++++++++++ .../smsmessenger/extensions/Activity.kt | 16 ++ .../smsmessenger/extensions/Date.kt | 8 + .../smsmessenger/extensions/String.kt | 5 + .../smsmessenger/helpers/Constants.kt | 1 + .../smsmessenger/helpers/VCardParser.kt | 15 ++ .../smsmessenger/models/VCard.kt | 54 +++++ app/src/main/res/drawable/ic_collapse_up.xml | 3 + app/src/main/res/drawable/ic_expand_down.xml | 3 + .../main/res/layout/activity_vcard_viewer.xml | 35 +++ .../main/res/layout/item_attachment_vcard.xml | 55 +++++ .../main/res/layout/item_vcard_contact.xml | 58 +++++ .../layout/item_vcard_contact_property.xml | 46 ++++ app/src/main/res/menu/menu_vcard.xml | 9 + app/src/main/res/values-ar/strings.xml | 16 +- app/src/main/res/values-az/strings.xml | 16 +- app/src/main/res/values-be/strings.xml | 16 +- app/src/main/res/values-bg/strings.xml | 16 +- app/src/main/res/values-ca/strings.xml | 16 +- app/src/main/res/values-cs/strings.xml | 16 +- app/src/main/res/values-da/strings.xml | 16 +- app/src/main/res/values-de/strings.xml | 16 +- app/src/main/res/values-el/strings.xml | 16 +- app/src/main/res/values-eo/strings.xml | 16 +- app/src/main/res/values-es/strings.xml | 16 +- app/src/main/res/values-et/strings.xml | 16 +- app/src/main/res/values-fi/strings.xml | 16 +- app/src/main/res/values-fr/strings.xml | 16 +- app/src/main/res/values-gl/strings.xml | 16 +- app/src/main/res/values-hr/strings.xml | 16 +- app/src/main/res/values-hu/strings.xml | 16 +- app/src/main/res/values-in/strings.xml | 16 +- app/src/main/res/values-it/strings.xml | 16 +- app/src/main/res/values-iw/strings.xml | 16 +- app/src/main/res/values-ja/strings.xml | 16 +- app/src/main/res/values-lt/strings.xml | 16 +- app/src/main/res/values-ml/strings.xml | 16 +- app/src/main/res/values-nb-rNO/strings.xml | 16 +- app/src/main/res/values-nl/strings.xml | 16 +- app/src/main/res/values-pl/strings.xml | 16 +- app/src/main/res/values-pt-rBR/strings.xml | 16 +- app/src/main/res/values-pt/strings.xml | 16 +- app/src/main/res/values-ro/strings.xml | 16 +- app/src/main/res/values-ru/strings.xml | 16 +- app/src/main/res/values-sk/strings.xml | 16 +- app/src/main/res/values-sv/strings.xml | 16 +- app/src/main/res/values-ta/strings.xml | 16 +- app/src/main/res/values-th/strings.xml | 16 +- app/src/main/res/values-tr/strings.xml | 16 +- app/src/main/res/values-uk/strings.xml | 16 +- app/src/main/res/values-zh-rCN/strings.xml | 16 +- app/src/main/res/values-zh-rTW/strings.xml | 16 +- app/src/main/res/values/dimens.xml | 1 + app/src/main/res/values/strings.xml | 14 ++ 58 files changed, 1263 insertions(+), 117 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Date.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/VCardParser.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt create mode 100644 app/src/main/res/drawable/ic_collapse_up.xml create mode 100644 app/src/main/res/drawable/ic_expand_down.xml create mode 100644 app/src/main/res/layout/activity_vcard_viewer.xml create mode 100644 app/src/main/res/layout/item_attachment_vcard.xml create mode 100644 app/src/main/res/layout/item_vcard_contact.xml create mode 100644 app/src/main/res/layout/item_vcard_contact_property.xml create mode 100644 app/src/main/res/menu/menu_vcard.xml diff --git a/app/build.gradle b/app/build.gradle index 0917db47..2df2b061 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -69,6 +69,7 @@ dependencies { implementation 'com.github.tibbi:android-smsmms:4cdacdb701' implementation "me.leolin:ShortcutBadger:1.1.22" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' + implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' kapt "androidx.room:room-compiler:2.4.3" implementation "androidx.room:room-runtime:2.4.3" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e253980e..c25e7105 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -135,6 +135,12 @@ android:label="@string/blocked_numbers" android:parentActivityName=".activities.SettingsActivity" /> + + + when (menuItem.itemId) { + R.id.add_contact -> { + val intent = Intent(Intent.ACTION_VIEW).apply { + val mimetype = contentResolver.getType(vCardUri) + setDataAndType(vCardUri, mimetype?.lowercase()) + addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) + } + startActivity(intent) + } + else -> return@setOnMenuItemClickListener false + } + return@setOnMenuItemClickListener true + } + } + + private fun setupContactsList(vCards: List) { + val items = prepareData(vCards) + val adapter = VCardViewerAdapter(this, items.toMutableList()) { item -> + val property = item as? VCardPropertyWrapper + if (property != null) { + handleClick(item) + } + } + contacts_list.adapter = adapter + } + + private fun handleClick(property: VCardPropertyWrapper) { + when (property.property) { + is Telephone -> dialNumber(property.value.normalizePhoneNumber()) + is Email -> sendMail(property.value) + } + } + + private fun prepareData(vCards: List): List { + return vCards.map { VCardWrapper(it) } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 75c31e54..9c59d4ee 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -32,13 +32,13 @@ import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.NewConversationActivity import com.simplemobiletools.smsmessenger.activities.SimpleActivity import com.simplemobiletools.smsmessenger.activities.ThreadActivity +import com.simplemobiletools.smsmessenger.activities.VCardViewerActivity import com.simplemobiletools.smsmessenger.dialogs.SelectTextDialog -import com.simplemobiletools.smsmessenger.extensions.deleteMessage -import com.simplemobiletools.smsmessenger.extensions.getContactFromAddress -import com.simplemobiletools.smsmessenger.extensions.updateLastConversationMessage +import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.* import com.simplemobiletools.smsmessenger.models.* import kotlinx.android.synthetic.main.item_attachment_image.view.* +import kotlinx.android.synthetic.main.item_attachment_vcard.view.* import kotlinx.android.synthetic.main.item_received_message.view.* import kotlinx.android.synthetic.main.item_received_unknown_attachment.view.* import kotlinx.android.synthetic.main.item_sent_unknown_attachment.view.* @@ -290,102 +290,167 @@ class ThreadAdapter( if (message.attachment?.attachments?.isNotEmpty() == true) { for (attachment in message.attachment.attachments) { val mimetype = attachment.mimetype - val uri = attachment.getUri() - if (mimetype.startsWith("image/") || mimetype.startsWith("video/")) { - val imageView = layoutInflater.inflate(R.layout.item_attachment_image, null) - thread_mesage_attachments_holder.addView(imageView) + if (mimetype.isImageMimeType() || mimetype.startsWith("video/")) { + setupImageView(holder, view, message, attachment) + } else if (mimetype.isVCardMimeType()) { + setupVCardView(holder, view, message, attachment) + } else { + setupFileView(holder, view, message, attachment) + } - val placeholderDrawable = ColorDrawable(Color.TRANSPARENT) - val isTallImage = attachment.height > attachment.width - val transformation = if (isTallImage) CenterCrop() else FitCenter() - val options = RequestOptions() - .diskCacheStrategy(DiskCacheStrategy.RESOURCE) - .placeholder(placeholderDrawable) - .transform(transformation) + thread_message_play_outline.beVisibleIf(mimetype.startsWith("video/")) + } + } + } + } - var builder = Glide.with(context) - .load(uri) - .transition(DrawableTransitionOptions.withCrossFade()) - .apply(options) - .listener(object : RequestListener { - override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { - thread_message_play_outline.beGone() - thread_mesage_attachments_holder.removeView(imageView) - return false - } + private fun setupImageView(holder: ViewHolder, parent: View, message: Message, attachment: Attachment) { + val mimetype = attachment.mimetype + val uri = attachment.getUri() + parent.apply { + val imageView = layoutInflater.inflate(R.layout.item_attachment_image, null) + thread_mesage_attachments_holder.addView(imageView) - override fun onResourceReady(dr: Drawable?, a: Any?, t: Target?, d: DataSource?, i: Boolean) = - false - }) + val placeholderDrawable = ColorDrawable(Color.TRANSPARENT) + val isTallImage = attachment.height > attachment.width + val transformation = if (isTallImage) CenterCrop() else FitCenter() + val options = RequestOptions() + .diskCacheStrategy(DiskCacheStrategy.RESOURCE) + .placeholder(placeholderDrawable) + .transform(transformation) - builder = if (isTallImage) { - builder.override(attachment.width, attachment.width) + var builder = Glide.with(context) + .load(uri) + .transition(DrawableTransitionOptions.withCrossFade()) + .apply(options) + .listener(object : RequestListener { + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { + thread_message_play_outline.beGone() + thread_mesage_attachments_holder.removeView(imageView) + return false + } + + override fun onResourceReady(dr: Drawable?, a: Any?, t: Target?, d: DataSource?, i: Boolean) = + false + }) + + builder = if (isTallImage) { + builder.override(attachment.width, attachment.width) + } else { + builder.override(attachment.width, attachment.height) + } + + builder.into(imageView.attachment_image) + imageView.attachment_image.setOnClickListener { + if (actModeCallback.isSelectable) { + holder.viewClicked(message) + } else { + launchViewIntent(uri, mimetype, attachment.filename) + } + } + imageView.setOnLongClickListener { + holder.viewLongClicked() + true + } + } + } + + private fun setupVCardView(holder: ViewHolder, parent: View, message: Message, attachment: Attachment) { + val uri = attachment.getUri() + parent.apply { + val vCardView = layoutInflater.inflate(R.layout.item_attachment_vcard, null).apply { + background.applyColorFilter(backgroundColor.getContrastColor()) + vcard_title.setTextColor(textColor) + vcard_subtitle.setTextColor(textColor) + vcard_view_contact.setTextColor(context.getLinkTextColor()) + } + thread_mesage_attachments_holder.addView(vCardView) + + parseVCardFromUri(context, uri) { vCards -> + val title = vCards.first().formattedName.value + val imageIcon = SimpleContactsHelper(context).getContactLetterIcon(title) + activity.runOnUiThread { + vCardView.apply { + vcard_title.text = title + vcard_photo.setImageBitmap(imageIcon) + + if (vCards.size > 1) { + vcard_subtitle.beVisible() + val quantity = vCards.size - 1 + vcard_subtitle.text = resources.getQuantityString(R.plurals.and_other_contacts, quantity, quantity) } else { - builder.override(attachment.width, attachment.height) + vcard_subtitle.beGone() } + vcard_view_contact.text = resources.getQuantityString(R.plurals.view_contact, vCards.size) - builder.into(imageView.attachment_image) - imageView.attachment_image.setOnClickListener { + setOnClickListener { + if (actModeCallback.isSelectable) { + holder.viewClicked(message) + } else { + val intent = Intent(context, VCardViewerActivity::class.java).also { + it.putExtra(EXTRA_VCARD_URI, uri) + } + context.startActivity(intent) + } + } + setOnLongClickListener { + holder.viewLongClicked() + true + } + } + } + } + } + } + + private fun setupFileView(holder: ViewHolder, parent: View, message: Message, attachment: Attachment) { + val mimetype = attachment.mimetype + val uri = attachment.getUri() + parent.apply { + if (message.isReceivedMessage()) { + val attachmentView = layoutInflater.inflate(R.layout.item_received_unknown_attachment, null).apply { + thread_received_attachment_label.apply { + if (attachment.filename.isNotEmpty()) { + thread_received_attachment_label.text = attachment.filename + } + setTextColor(textColor) + setOnClickListener { if (actModeCallback.isSelectable) { holder.viewClicked(message) } else { launchViewIntent(uri, mimetype, attachment.filename) } } - imageView.setOnLongClickListener { + setOnLongClickListener { holder.viewLongClicked() true } - } else { - if (message.isReceivedMessage()) { - val attachmentView = layoutInflater.inflate(R.layout.item_received_unknown_attachment, null).apply { - thread_received_attachment_label.apply { - if (attachment.filename.isNotEmpty()) { - thread_received_attachment_label.text = attachment.filename - } - setTextColor(textColor) - setOnClickListener { - if (actModeCallback.isSelectable) { - holder.viewClicked(message) - } else { - launchViewIntent(uri, mimetype, attachment.filename) - } - } - setOnLongClickListener { - holder.viewLongClicked() - true - } - } + } + } + thread_mesage_attachments_holder.addView(attachmentView) + } else { + val background = context.getProperPrimaryColor() + val attachmentView = layoutInflater.inflate(R.layout.item_sent_unknown_attachment, null).apply { + thread_sent_attachment_label.apply { + this.background.applyColorFilter(background) + setTextColor(background.getContrastColor()) + if (attachment.filename.isNotEmpty()) { + thread_sent_attachment_label.text = attachment.filename + } + setOnClickListener { + if (actModeCallback.isSelectable) { + holder.viewClicked(message) + } else { + launchViewIntent(uri, mimetype, attachment.filename) } - thread_mesage_attachments_holder.addView(attachmentView) - } else { - val background = context.getProperPrimaryColor() - val attachmentView = layoutInflater.inflate(R.layout.item_sent_unknown_attachment, null).apply { - thread_sent_attachment_label.apply { - this.background.applyColorFilter(background) - setTextColor(background.getContrastColor()) - if (attachment.filename.isNotEmpty()) { - thread_sent_attachment_label.text = attachment.filename - } - setOnClickListener { - if (actModeCallback.isSelectable) { - holder.viewClicked(message) - } else { - launchViewIntent(uri, mimetype, attachment.filename) - } - } - setOnLongClickListener { - holder.viewLongClicked() - true - } - } - } - thread_mesage_attachments_holder.addView(attachmentView) + } + setOnLongClickListener { + holder.viewLongClicked() + true } } - - thread_message_play_outline.beVisibleIf(mimetype.startsWith("video/")) } + thread_mesage_attachments_holder.addView(attachmentView) } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt new file mode 100644 index 00000000..b094f517 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -0,0 +1,138 @@ +package com.simplemobiletools.smsmessenger.adapters + +import android.util.TypedValue +import android.view.View +import android.view.ViewGroup +import androidx.core.graphics.drawable.toDrawable +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.load.resource.bitmap.RoundedCorners +import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions +import com.bumptech.glide.request.RequestOptions +import com.simplemobiletools.commons.extensions.getProperTextColor +import com.simplemobiletools.commons.extensions.getTextSize +import com.simplemobiletools.commons.extensions.onGlobalLayout +import com.simplemobiletools.commons.helpers.SimpleContactsHelper +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.activities.SimpleActivity +import com.simplemobiletools.smsmessenger.models.VCardPropertyWrapper +import com.simplemobiletools.smsmessenger.models.VCardWrapper +import kotlinx.android.synthetic.main.item_vcard_contact.view.* +import kotlinx.android.synthetic.main.item_vcard_contact_property.view.* + +class VCardViewerAdapter( + private val activity: SimpleActivity, private var items: MutableList, private val itemClick: (Any) -> Unit +) : RecyclerView.Adapter() { + + private var fontSize = activity.getTextSize() + private var textColor = activity.getProperTextColor() + private val layoutInflater = activity.layoutInflater + + override fun getItemCount() = items.size + + override fun getItemViewType(position: Int): Int { + return when (val item = items[position]) { + is VCardWrapper -> R.layout.item_vcard_contact + is VCardPropertyWrapper -> R.layout.item_vcard_contact_property + else -> throw IllegalArgumentException("Unexpected type: ${item::class.simpleName}") + } + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VCardViewHolder { + val view = layoutInflater.inflate(viewType, parent, false) + return VCardViewHolder(view) + } + + override fun onBindViewHolder(holder: VCardViewerAdapter.VCardViewHolder, position: Int) { + val item = items[position] + val itemView = holder.bindView() + when (item) { + is VCardWrapper -> setupVCardView(itemView, item) + is VCardPropertyWrapper -> setupVCardPropertyView(itemView, item) + else -> throw IllegalArgumentException("Unexpected type: ${item::class.simpleName}") + } + } + + private fun setupVCardView(view: View, item: VCardWrapper) { + val name = item.vCard.formattedName.value + view.apply { + item_contact_name.apply { + text = name + setTextColor(textColor) + setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 1.2f) + } + item_contact_image.apply { + val photo = item.vCard.photos.firstOrNull() + val placeholder = SimpleContactsHelper(context).getContactLetterIcon(name).toDrawable(resources) + val roundingRadius = resources.getDimensionPixelSize(R.dimen.big_margin) + val transformation = RoundedCorners(roundingRadius) + val options = RequestOptions() + .diskCacheStrategy(DiskCacheStrategy.RESOURCE) + .placeholder(placeholder) + .transform(transformation) + Glide.with(this) + .load(photo?.data ?: photo?.url) + .apply(options) + .transition(DrawableTransitionOptions.withCrossFade()) + .into(this) + } + setOnClickListener { + expandOrCollapseRow(view, item) + } + onGlobalLayout { + if (items.size == 1) { + expandOrCollapseRow(view, item) + } + } + } + } + + private fun setupVCardPropertyView(view: View, property: VCardPropertyWrapper) { + view.apply { + item_vcard_property_title.apply { + text = property.value + setTextColor(textColor) + setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 1.2f) + } + item_vcard_property_subtitle.apply { + text = property.type + setTextColor(textColor) + } + view.setOnClickListener { + itemClick(property) + } + } + } + + private fun expandOrCollapseRow(view: View, item: VCardWrapper) { + val properties = item.getVCardProperties(context = activity) + if (item.expanded) { + collapseRow(view, properties, item) + } else { + expandRow(view, properties, item) + } + } + + private fun expandRow(view: View, properties: List, vCardWrapper: VCardWrapper) { + vCardWrapper.expanded = true + val nextPosition = items.indexOf(vCardWrapper) + 1 + items.addAll(nextPosition, properties) + notifyItemRangeInserted(nextPosition, properties.size) + view.expand_collapse_icon.setImageResource(R.drawable.ic_collapse_up) + } + + private fun collapseRow(view: View, properties: List, vCardWrapper: VCardWrapper) { + vCardWrapper.expanded = false + val nextPosition = items.indexOf(vCardWrapper) + 1 + repeat(properties.size) { + items.removeAt(nextPosition) + } + notifyItemRangeRemoved(nextPosition, properties.size) + view.expand_collapse_icon.setImageResource(R.drawable.ic_expand_down) + } + + inner class VCardViewHolder(view: View) : RecyclerView.ViewHolder(view) { + fun bindView() = itemView + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt index 1d165091..e6200b49 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt @@ -24,3 +24,19 @@ fun Activity.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) { } } } + +fun Activity.sendMail(email: String) { + hideKeyboard() + Intent(Intent.ACTION_SENDTO).apply { + data = Uri.parse("mailto:") + putExtra(Intent.EXTRA_EMAIL, email) + + try { + startActivity(this) + } catch (e: ActivityNotFoundException) { + toast(R.string.no_app_found) + } catch (e: Exception) { + showErrorToast(e) + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Date.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Date.kt new file mode 100644 index 00000000..7cde1a5b --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Date.kt @@ -0,0 +1,8 @@ +package com.simplemobiletools.smsmessenger.extensions + +import android.text.format.DateFormat +import java.util.* + +fun Date.format(pattern: String): String { + return DateFormat.format(pattern, this).toString() +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/String.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/String.kt index acdf0bb9..89fb0f03 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/String.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/String.kt @@ -14,3 +14,8 @@ fun String.getExtensionFromMimeType(): String { fun String.isImageMimeType(): Boolean { return lowercase().startsWith("image") } + +fun String.isVCardMimeType(): Boolean { + val lowercase = lowercase() + return lowercase.endsWith("x-vcard") || lowercase.endsWith("vcard") +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt index 21a85a95..973e56bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -28,6 +28,7 @@ const val EXPORT_FILE_EXT = ".json" const val IMPORT_SMS = "import_sms" const val IMPORT_MMS = "import_mms" const val WAS_DB_CLEARED = "was_db_cleared_2" +const val EXTRA_VCARD_URI = "vcard" private const val PATH = "com.simplemobiletools.smsmessenger.action." const val MARK_AS_READ = PATH + "mark_as_read" diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/VCardParser.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/VCardParser.kt new file mode 100644 index 00000000..e01217bf --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/VCardParser.kt @@ -0,0 +1,15 @@ +package com.simplemobiletools.smsmessenger.helpers + +import android.content.Context +import android.net.Uri +import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import ezvcard.Ezvcard +import ezvcard.VCard + +fun parseVCardFromUri(context: Context, uri: Uri, callback: (vCards: List) -> Unit) { + ensureBackgroundThread { + val inputStream = context.contentResolver.openInputStream(uri) + val vCards = Ezvcard.parse(inputStream).all() + callback(vCards) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt new file mode 100644 index 00000000..667ee8dd --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt @@ -0,0 +1,54 @@ +package com.simplemobiletools.smsmessenger.models + +import android.content.Context +import com.simplemobiletools.commons.extensions.normalizePhoneNumber +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.extensions.config +import com.simplemobiletools.smsmessenger.extensions.format +import ezvcard.VCard +import ezvcard.property.* + +private val displayedPropertyClasses = arrayOf( + Telephone::class.java, Email::class.java, Organization::class.java, Birthday::class.java, Anniversary::class.java, Note::class.java +) + +data class VCardWrapper(val vCard: VCard, var expanded: Boolean = false) { + + fun getVCardProperties(context: Context): List { + return vCard.properties + .filter { displayedPropertyClasses.contains(it::class.java) } + .map { VCardPropertyWrapper.from(context, it) } + } +} + +data class VCardPropertyWrapper(val value: String, val type: String, val property: VCardProperty) { + + companion object { + private const val CELL = "CELL" + private const val HOME = "HOME" + private const val WORK = "WORK" + + private fun VCardProperty.getPropertyTypeString(context: Context): String { + return when (parameters.type) { + CELL -> context.getString(R.string.mobile) + HOME -> context.getString(R.string.home) + WORK -> context.getString(R.string.work) + else -> "" + } + } + + fun from(context: Context, property: VCardProperty): VCardPropertyWrapper { + return property.run { + when (this) { + is Telephone -> VCardPropertyWrapper(text.normalizePhoneNumber(), getPropertyTypeString(context), property) + is Email -> VCardPropertyWrapper(value, getPropertyTypeString(context), property) + is Organization -> VCardPropertyWrapper(values.joinToString(), context.getString(R.string.work), property) + is Birthday -> VCardPropertyWrapper(date.format(context.config.dateFormat), context.getString(R.string.birthday), property) + is Anniversary -> VCardPropertyWrapper(date.format(context.config.dateFormat), context.getString(R.string.anniversary), property) + is Note -> VCardPropertyWrapper(value, context.getString(R.string.notes), property) + else -> VCardPropertyWrapper("", "", property) + } + } + } + } +} diff --git a/app/src/main/res/drawable/ic_collapse_up.xml b/app/src/main/res/drawable/ic_collapse_up.xml new file mode 100644 index 00000000..fca0e627 --- /dev/null +++ b/app/src/main/res/drawable/ic_collapse_up.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_expand_down.xml b/app/src/main/res/drawable/ic_expand_down.xml new file mode 100644 index 00000000..1506c3b0 --- /dev/null +++ b/app/src/main/res/drawable/ic_expand_down.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/layout/activity_vcard_viewer.xml b/app/src/main/res/layout/activity_vcard_viewer.xml new file mode 100644 index 00000000..3f28d896 --- /dev/null +++ b/app/src/main/res/layout/activity_vcard_viewer.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_attachment_vcard.xml b/app/src/main/res/layout/item_attachment_vcard.xml new file mode 100644 index 00000000..7d553efe --- /dev/null +++ b/app/src/main/res/layout/item_attachment_vcard.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_vcard_contact.xml b/app/src/main/res/layout/item_vcard_contact.xml new file mode 100644 index 00000000..10770498 --- /dev/null +++ b/app/src/main/res/layout/item_vcard_contact.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_vcard_contact_property.xml b/app/src/main/res/layout/item_vcard_contact_property.xml new file mode 100644 index 00000000..1b1789b5 --- /dev/null +++ b/app/src/main/res/layout/item_vcard_contact_property.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + diff --git a/app/src/main/res/menu/menu_vcard.xml b/app/src/main/res/menu/menu_vcard.xml new file mode 100644 index 00000000..57556649 --- /dev/null +++ b/app/src/main/res/menu/menu_vcard.xml @@ -0,0 +1,9 @@ + + + + diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 4c3e6fc2..ae5d0cd5 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -20,6 +20,20 @@ ازالة التثبيت اعادة ارسال غير قادر على ضغط الصورة إلى الحجم المحدد + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact محادثة جديدة إضافة جهة اتصال أو رقم … @@ -79,4 +93,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 06a7ea86..e58cfeca 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact New conversation Add Contact or Number… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 9c6cfad5..e385f684 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -20,6 +20,20 @@ Адмацаваць Пераслаць Немагчыма сціснуць выяву да выбранага памеру + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Новая размова Дадаць кантакт альбо нумар… @@ -75,4 +89,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index f14a1840..5474bf48 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -20,6 +20,20 @@ Откачване Препращане Невъзможно е да се компресира изображението до избрания размер + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Нов разговор Добавете контакт или номер… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 1f76b105..6e54fcb4 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -20,6 +20,20 @@ No fixis Reenvia No s\'ha pogut comprimir la imatge a la mida seleccionada + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Conversa nova Afegeix un contacte o número… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index ccccfcaf..50a1ba34 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -20,6 +20,20 @@ Odepnout Přeposlat Nepodařilo se komprimovat obrázek na požadovanou velikost + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nová konverzace Přidejte kontakt nebo číslo… @@ -73,4 +87,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 4bff71f6..d13896dc 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -20,6 +20,20 @@ Frigør Fremad Billedet kan ikke komprimeres til den valgte størrelse + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Ny Samtale Tilføj kontakt eller nummer… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 7412f4e3..cc395d80 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -20,6 +20,20 @@ Losheften Weiterleiten Bild kann nicht auf ausgewählte Größe komprimiert werden + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Neuer Chat Kontakt oder Nummer hinzufügen … @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index a4de4eb9..806d5789 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -20,6 +20,20 @@ Ξεκαρφίτσωμα Προώθηση Αδυναμία συμπίεσης εικόνας στο επιλεγμένο μέγεθος + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Νέα συνομιλία Προσθήκη επαφής ή αριθμού… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index da1e085b..11b4d9d3 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -20,6 +20,20 @@ Depingli Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact New conversation Add Contact or Number… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index b3d85c2e..be42cd44 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -20,6 +20,20 @@ Desanclar Reenviar Incapaz de comprimir la imagen al tamaño seleccionado + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nueva conversación Escribe contacto o número… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 5e1c0a1d..fcfa1c96 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -20,6 +20,20 @@ Eemalda kinnitus Edasta Pildi muutmine valitud suurusesse ei õnnestu + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Uus vestlus Add Contact or Number… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 5124ec80..b0f2db22 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Uusi keskustelu Lisää yhteystieto tai numero… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 220d7eb5..7f5141b2 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -20,6 +20,20 @@ Désépingler Transférer Impossible de compresser l\'image à la taille sélectionnée + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nouvelle conversation Ajouter un contact ou un numéro… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 15aedaec..be1d6610 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nova conversa Engadir contacto ou número… @@ -71,4 +85,4 @@ Non atopaches algunhas cadeas? Hai máis en https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 895b3665..7b2b97d9 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -20,6 +20,20 @@ Otkvači Proslijedi Isključi za komprimiranje slike na odabranu veličinu + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nova konverzacija Dodaj kontakt ili broj … @@ -73,4 +87,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 6af63212..6305f64a 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -20,6 +20,20 @@ Kitűzés megszüntetése Továbbítás Nem lehet tömöríteni a képet a kiválasztott méretre + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Új beszélgetés Névjegy vagy szám hozzáadása… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 6e9afd42..50ebbd79 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Percakapan baru Tambahkan Kontak atau Nomor… @@ -69,4 +83,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 06721ecc..a06f7092 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -20,6 +20,20 @@ Rimuovi Inoltra Impossibile comprimere l\'immagine alla dimensione selezionata + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nuova conversazione Inserisci contatto o numero… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index ba2ca917..36066ed0 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -20,6 +20,20 @@ בטל הצמדה התקדם לא ניתן לדחוס תמונה לגודל שנבחר + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact שיחה חדשה הוסף איש קשר או מספר… @@ -75,4 +89,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 01451200..92b2b7f2 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -20,6 +20,20 @@ 固定を外す 転送 選択したサイズに画像を圧縮できません + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact 新しい会話 連絡先や電話番号を追加… @@ -69,4 +83,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index c653512d..da31d743 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -20,6 +20,20 @@ Atjunkite Pirmyn Nepavyksta suspausti vaizdo iki pasirinkto dydžio + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Naujas pokalbis Pridėti kontaktą arba numerį… @@ -73,4 +87,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 975d3015..bbcc2c6c 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact പുതിയ സംഭാഷണം കോൺടാക്റ്റ് അല്ലെങ്കിൽ നമ്പർ ചേർക്കുക… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index d066aa15..bda2cfa6 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -20,6 +20,20 @@ Løsne Videresend Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Ny samtale Legg til kontakt eller nummer … @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 37e9242e..1b13480f 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -20,6 +20,20 @@ Losmaken Doorsturen Kon de afbeelding niet comprimeren naar de gekozen grootte + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nieuw gesprek Contact of nummer toevoegen… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 816a4603..09c540bf 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -20,6 +20,20 @@ Odepnij Przekaż dalej Nie udało się skompresować obrazu do wybranego rozmiaru + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nowa rozmowa Dodaj kontakt lub numer… @@ -75,4 +89,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 2006873b..df1ac35a 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -20,6 +20,20 @@ Desfixar Encaminhar Não pôde comprimir imagem ao tamanho selecionado + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nova conversa Adicionar contato ou número… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 59a87c38..b1aaae75 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -20,6 +20,20 @@ Desafixar Reencaminhar Incapaz de comprimir imagem no tamanho selecionado + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nova conversa Adicionar contacto ou número… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index e2b584ab..5665927e 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -20,6 +20,20 @@ Elimină fixarea Redirecţionare Nu se poate comprima imaginea la dimensiunea selectată + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Conversaţie nouă Adaugă contact sau număr de telefon… @@ -73,4 +87,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 153a9c03..a8de9863 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -20,6 +20,20 @@ Открепить Переслать Невозможно сжать изображение до выбранного размера + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Новая переписка Добавить контакт или номер… @@ -75,4 +89,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index d536ebce..d15f212c 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -20,6 +20,20 @@ Odopnúť Preposlať Nepodarilo sa zmenšiť obrázok na požadovanú veľkosť + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Nová konverzácia Pridať kontakt alebo číslo… @@ -73,4 +87,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 8cefe0ed..3ddda925 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -20,6 +20,20 @@ Lossa Vidarebefordra Det gick inte att komprimera bilden till den valda storleken + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Ny konversation Lägg till kontakt eller nummer… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 989088d0..beaff84e 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -20,6 +20,20 @@ பின் நீக்கு முன்னோக்கி Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact புதிய உரையாடல் தொடர்பு அல்லது எண்ணைச் சேர்க்கவும்… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 0c422d3b..ae34f530 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact New conversation Add Contact or Number… @@ -69,4 +83,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index a13d1214..ec02b0cf 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -20,6 +20,20 @@ Sabitlemeyi kaldır İlet Resim seçilen boyuta sıkıştırılamıyor + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Yeni görüşme Kişi veya Numara Ekle… @@ -71,4 +85,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 4252edbe..c2aded9c 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -20,6 +20,20 @@ Відкріпити Переслати Не вдається стиснути зображення до вибраного розміру + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact Нове листування Додати контакт аба номер… @@ -75,4 +89,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index f16f5033..727f3372 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -20,6 +20,20 @@ 取消固定 转发 无法将图像压缩到选定的大小 + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact 新的对话 添加联系人或者号码… @@ -69,4 +83,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 670239ce..4bc6f929 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -20,6 +20,20 @@ 取消釘選 轉傳 無法將圖片壓縮至指定大小 + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact 新對話 新增聯絡對象或電話號碼…… @@ -69,4 +83,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 5411875a..4db2905d 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -6,4 +6,5 @@ 60dp 24dp 15dp + 56dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ce1f6df3..f595439e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -20,6 +20,20 @@ Unpin Forward Unable to compress image to selected size + + + View contact + View contacts + + + and %d other + and %d others + + Contact info + Notes + Anniversary + Birthday + Add contact New conversation Add Contact or Number… From d2c883710fe5a1cf53617092ae9e2f2991472e9f Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 03:20:13 +0530 Subject: [PATCH 02/20] Add clarifying parentheses --- .../simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 9c59d4ee..838d0aa9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -53,7 +53,7 @@ class ThreadAdapter( private var fontSize = activity.getTextSize() @SuppressLint("MissingPermission") - private val hasMultipleSIMCards = SubscriptionManager.from(activity).activeSubscriptionInfoList?.size ?: 0 > 1 + private val hasMultipleSIMCards = (SubscriptionManager.from(activity).activeSubscriptionInfoList?.size ?: 0) > 1 init { setupDragListener(true) From c51646d5194dd4a489700939a6852890edb488f6 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 03:44:45 +0530 Subject: [PATCH 03/20] Adjust view padding, margin --- app/src/main/res/layout/item_vcard_contact.xml | 8 +++----- app/src/main/res/values/dimens.xml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/layout/item_vcard_contact.xml b/app/src/main/res/layout/item_vcard_contact.xml index 10770498..6246baa6 100644 --- a/app/src/main/res/layout/item_vcard_contact.xml +++ b/app/src/main/res/layout/item_vcard_contact.xml @@ -14,9 +14,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/min_row_height" - android:paddingStart="@dimen/tiny_margin" + android:paddingStart="@dimen/medium_margin" android:paddingTop="@dimen/medium_margin" - android:paddingEnd="@dimen/activity_margin" + android:paddingEnd="@dimen/tiny_margin" android:paddingBottom="@dimen/medium_margin"> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 4db2905d..68e9a072 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -6,5 +6,5 @@ 60dp 24dp 15dp - 56dp + 64dp From 317cb9b883ecc18d8dce6bbeb51b9a31ef58437e Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 03:45:22 +0530 Subject: [PATCH 04/20] Check for nullability --- .../smsmessenger/adapters/ThreadAdapter.kt | 8 ++++++-- .../smsmessenger/adapters/VCardViewerAdapter.kt | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 838d0aa9..205c8c0b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -367,8 +367,12 @@ class ThreadAdapter( thread_mesage_attachments_holder.addView(vCardView) parseVCardFromUri(context, uri) { vCards -> - val title = vCards.first().formattedName.value - val imageIcon = SimpleContactsHelper(context).getContactLetterIcon(title) + val title = vCards.firstOrNull()?.formattedName?.value + val imageIcon = if (title != null) { + SimpleContactsHelper(context).getContactLetterIcon(title) + } else { + null + } activity.runOnUiThread { vCardView.apply { vcard_title.text = title diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index b094f517..1d63d84a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -55,7 +55,7 @@ class VCardViewerAdapter( } private fun setupVCardView(view: View, item: VCardWrapper) { - val name = item.vCard.formattedName.value + val name = item.vCard.formattedName?.value view.apply { item_contact_name.apply { text = name @@ -64,7 +64,11 @@ class VCardViewerAdapter( } item_contact_image.apply { val photo = item.vCard.photos.firstOrNull() - val placeholder = SimpleContactsHelper(context).getContactLetterIcon(name).toDrawable(resources) + val placeholder = if (name != null) { + SimpleContactsHelper(context).getContactLetterIcon(name).toDrawable(resources) + } else { + null + } val roundingRadius = resources.getDimensionPixelSize(R.dimen.big_margin) val transformation = RoundedCorners(roundingRadius) val options = RequestOptions() From 00d69ad40e1c86e9704f6313ef155cf205ee9622 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 03:56:44 +0530 Subject: [PATCH 05/20] Ignore duplicated properties --- .../kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt index 667ee8dd..22e8b9c8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt @@ -18,6 +18,7 @@ data class VCardWrapper(val vCard: VCard, var expanded: Boolean = false) { return vCard.properties .filter { displayedPropertyClasses.contains(it::class.java) } .map { VCardPropertyWrapper.from(context, it) } + .distinctBy { it.value } } } From 4f809426bb35b808c617a28232735944c21c76d2 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 04:16:45 +0530 Subject: [PATCH 06/20] Construct name from structured name --- .../smsmessenger/adapters/VCardViewerAdapter.kt | 2 +- .../smsmessenger/models/VCard.kt | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index 1d63d84a..fa31a04c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -55,7 +55,7 @@ class VCardViewerAdapter( } private fun setupVCardView(view: View, item: VCardWrapper) { - val name = item.vCard.formattedName?.value + val name = item.getFullName() view.apply { item_contact_name.apply { text = name diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt index 22e8b9c8..23609674 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt @@ -14,6 +14,21 @@ private val displayedPropertyClasses = arrayOf( data class VCardWrapper(val vCard: VCard, var expanded: Boolean = false) { + fun getFullName(): String? { + var formattedName = vCard.formattedName?.value + if (formattedName.isNullOrEmpty()) { + val structured = vCard.structuredName + val given = structured?.given + val family = structured.family + formattedName = if (family != null) { + given?.plus(" ")?.plus(family) + } else { + given + } + } + return formattedName + } + fun getVCardProperties(context: Context): List { return vCard.properties .filter { displayedPropertyClasses.contains(it::class.java) } From 2fa6e2513fd93494092a2f447f5297f0b9d72b12 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 04:43:56 +0530 Subject: [PATCH 07/20] Apply proper color to expand/collapse icon --- .../smsmessenger/adapters/VCardViewerAdapter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index fa31a04c..96e56783 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -10,6 +10,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions import com.bumptech.glide.request.RequestOptions +import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.getProperTextColor import com.simplemobiletools.commons.extensions.getTextSize import com.simplemobiletools.commons.extensions.onGlobalLayout @@ -81,6 +82,7 @@ class VCardViewerAdapter( .transition(DrawableTransitionOptions.withCrossFade()) .into(this) } + expand_collapse_icon.applyColorFilter(textColor) setOnClickListener { expandOrCollapseRow(view, item) } From 3d0312ff4472c98df727ae75e479101cfa85c5a4 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 14:08:26 +0530 Subject: [PATCH 08/20] Remove unnecessarily duplicated string --- .../smsmessenger/adapters/ThreadAdapter.kt | 2 +- app/src/main/res/values-ar/strings.xml | 7 +------ app/src/main/res/values-az/strings.xml | 5 ----- app/src/main/res/values-be/strings.xml | 5 ----- app/src/main/res/values-bg/strings.xml | 5 ----- app/src/main/res/values-ca/strings.xml | 5 ----- app/src/main/res/values-cs/strings.xml | 7 +------ app/src/main/res/values-da/strings.xml | 5 ----- app/src/main/res/values-de/strings.xml | 5 ----- app/src/main/res/values-el/strings.xml | 5 ----- app/src/main/res/values-eo/strings.xml | 5 ----- app/src/main/res/values-es/strings.xml | 5 ----- app/src/main/res/values-et/strings.xml | 5 ----- app/src/main/res/values-fi/strings.xml | 5 ----- app/src/main/res/values-fr/strings.xml | 5 ----- app/src/main/res/values-gl/strings.xml | 5 ----- app/src/main/res/values-hr/strings.xml | 5 ----- app/src/main/res/values-hu/strings.xml | 5 ----- app/src/main/res/values-in/strings.xml | 5 ----- app/src/main/res/values-it/strings.xml | 5 ----- app/src/main/res/values-iw/strings.xml | 5 ----- app/src/main/res/values-ja/strings.xml | 5 ----- app/src/main/res/values-lt/strings.xml | 5 ----- app/src/main/res/values-ml/strings.xml | 5 ----- app/src/main/res/values-nb-rNO/strings.xml | 5 ----- app/src/main/res/values-nl/strings.xml | 5 ----- app/src/main/res/values-pl/strings.xml | 5 ----- app/src/main/res/values-pt-rBR/strings.xml | 5 ----- app/src/main/res/values-pt/strings.xml | 5 ----- app/src/main/res/values-ro/strings.xml | 5 ----- app/src/main/res/values-ru/strings.xml | 5 ----- app/src/main/res/values-sk/strings.xml | 5 ----- app/src/main/res/values-sv/strings.xml | 5 ----- app/src/main/res/values-ta/strings.xml | 5 ----- app/src/main/res/values-th/strings.xml | 5 ----- app/src/main/res/values-tr/strings.xml | 5 ----- app/src/main/res/values-uk/strings.xml | 5 ----- app/src/main/res/values-zh-rCN/strings.xml | 5 ----- app/src/main/res/values-zh-rTW/strings.xml | 5 ----- app/src/main/res/values/strings.xml | 5 ----- 40 files changed, 3 insertions(+), 198 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 205c8c0b..d30a594b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -385,7 +385,7 @@ class ThreadAdapter( } else { vcard_subtitle.beGone() } - vcard_view_contact.text = resources.getQuantityString(R.plurals.view_contact, vCards.size) + vcard_view_contact.text = context.getString(R.string.view_contact_details) setOnClickListener { if (actModeCallback.isSelectable) { diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index ae5d0cd5..c17934ef 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -21,17 +21,12 @@ اعادة ارسال غير قادر على ضغط الصورة إلى الحجم المحدد - - View contact - View contacts - and %d other and %d others Contact info - Notes - Anniversary +Anniversary Birthday Add contact diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index e58cfeca..c3f11cce 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index e385f684..7df5010d 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -21,16 +21,11 @@ Пераслаць Немагчыма сціснуць выяву да выбранага памеру - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 5474bf48..47616094 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -21,16 +21,11 @@ Препращане Невъзможно е да се компресира изображението до избрания размер - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 6e54fcb4..ce71a01b 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -21,16 +21,11 @@ Reenvia No s\'ha pogut comprimir la imatge a la mida seleccionada - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 50a1ba34..e1396605 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -21,17 +21,12 @@ Přeposlat Nepodařilo se komprimovat obrázek na požadovanou velikost - - View contact - View contacts - and %d other and %d others Contact info - Notes - Anniversary +Anniversary Birthday Add contact diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d13896dc..a454771c 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -21,16 +21,11 @@ Fremad Billedet kan ikke komprimeres til den valgte størrelse - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index cc395d80..34bf0dfa 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -21,16 +21,11 @@ Weiterleiten Bild kann nicht auf ausgewählte Größe komprimiert werden - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 806d5789..ca47b9b4 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -21,16 +21,11 @@ Προώθηση Αδυναμία συμπίεσης εικόνας στο επιλεγμένο μέγεθος - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 11b4d9d3..0fe0233a 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index be42cd44..2d43a532 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -21,16 +21,11 @@ Reenviar Incapaz de comprimir la imagen al tamaño seleccionado - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index fcfa1c96..0191062d 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -21,16 +21,11 @@ Edasta Pildi muutmine valitud suurusesse ei õnnestu - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index b0f2db22..3a005e3d 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 7f5141b2..02739ec0 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -21,16 +21,11 @@ Transférer Impossible de compresser l\'image à la taille sélectionnée - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index be1d6610..d9360249 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index a5672a66..bdb618d9 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -21,16 +21,11 @@ Proslijedi Isključi za komprimiranje slike na odabranu veličinu - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 6305f64a..56d023ef 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -21,16 +21,11 @@ Továbbítás Nem lehet tömöríteni a képet a kiválasztott méretre - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 50ebbd79..0114fd17 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a06f7092..8dbea2e8 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -21,16 +21,11 @@ Inoltra Impossibile comprimere l\'immagine alla dimensione selezionata - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 36066ed0..5aea6e56 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -21,16 +21,11 @@ התקדם לא ניתן לדחוס תמונה לגודל שנבחר - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 92b2b7f2..e30e48e0 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -21,16 +21,11 @@ 転送 選択したサイズに画像を圧縮できません - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 4f10a79a..c6e40340 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -21,16 +21,11 @@ Pirmyn Nepavyksta suspausti vaizdo iki pasirinkto dydžio - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index bbcc2c6c..57c11485 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index bda2cfa6..d24196de 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -21,16 +21,11 @@ Videresend Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1b13480f..1f81d211 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -21,16 +21,11 @@ Doorsturen Kon de afbeelding niet comprimeren naar de gekozen grootte - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 09c540bf..68f2a813 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -21,16 +21,11 @@ Przekaż dalej Nie udało się skompresować obrazu do wybranego rozmiaru - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index df1ac35a..10651dde 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -21,16 +21,11 @@ Encaminhar Não pôde comprimir imagem ao tamanho selecionado - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index b1aaae75..ef7b118c 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -21,16 +21,11 @@ Reencaminhar Incapaz de comprimir imagem no tamanho selecionado - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 5665927e..cc8dcae3 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -21,16 +21,11 @@ Redirecţionare Nu se poate comprima imaginea la dimensiunea selectată - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a8de9863..a51ec34f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -21,16 +21,11 @@ Переслать Невозможно сжать изображение до выбранного размера - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index d15f212c..5eed1812 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -21,16 +21,11 @@ Preposlať Nepodarilo sa zmenšiť obrázok na požadovanú veľkosť - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 3ddda925..515d9eb9 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -21,16 +21,11 @@ Vidarebefordra Det gick inte att komprimera bilden till den valda storleken - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index beaff84e..c86cfd11 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -21,16 +21,11 @@ முன்னோக்கி Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index ae34f530..20b94088 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index ec02b0cf..cf735d83 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -21,16 +21,11 @@ İlet Resim seçilen boyuta sıkıştırılamıyor - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index c2aded9c..3f14594f 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -21,16 +21,11 @@ Переслати Не вдається стиснути зображення до вибраного розміру - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 727f3372..3fcd0d6d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -21,16 +21,11 @@ 转发 无法将图像压缩到选定的大小 - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 4bc6f929..91f32cde 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -21,16 +21,11 @@ 轉傳 無法將圖片壓縮至指定大小 - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f595439e..316c9510 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -21,16 +21,11 @@ Forward Unable to compress image to selected size - - View contact - View contacts - and %d other and %d others Contact info - Notes Anniversary Birthday Add contact From 5a17164d5e11561d3ad5312b24afc5e95f2ae070 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 14:41:17 +0530 Subject: [PATCH 09/20] Translate strings --- app/src/main/res/values-cr/strings.xml | 9 +++++++++ app/src/main/res/values-gr/strings.xml | 9 +++++++++ app/src/main/res/values-hi/strings.xml | 9 +++++++++ app/src/main/res/values-lv/strings.xml | 9 +++++++++ app/src/main/res/values-mk/strings.xml | 9 +++++++++ app/src/main/res/values-sl/strings.xml | 9 +++++++++ 6 files changed, 54 insertions(+) diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-gr/strings.xml b/app/src/main/res/values-gr/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-gr/strings.xml +++ b/app/src/main/res/values-gr/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index ce1f6df3..316c9510 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -20,6 +20,15 @@ Unpin Forward Unable to compress image to selected size + + + and %d other + and %d others + + Contact info + Anniversary + Birthday + Add contact New conversation Add Contact or Number… From 5c19e0144d51817ae2b51fab566646e451f99c10 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 15:47:57 +0530 Subject: [PATCH 10/20] Remove duplicated birthday and anniversary strings --- app/build.gradle | 2 +- app/src/main/res/values-ar/strings.xml | 2 -- app/src/main/res/values-az/strings.xml | 2 -- app/src/main/res/values-be/strings.xml | 2 -- app/src/main/res/values-bg/strings.xml | 2 -- app/src/main/res/values-ca/strings.xml | 2 -- app/src/main/res/values-cr/strings.xml | 2 -- app/src/main/res/values-cs/strings.xml | 2 -- app/src/main/res/values-da/strings.xml | 2 -- app/src/main/res/values-de/strings.xml | 2 -- app/src/main/res/values-el/strings.xml | 2 -- app/src/main/res/values-eo/strings.xml | 2 -- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-et/strings.xml | 2 -- app/src/main/res/values-fi/strings.xml | 2 -- app/src/main/res/values-fr/strings.xml | 2 -- app/src/main/res/values-gl/strings.xml | 2 -- app/src/main/res/values-gr/strings.xml | 2 -- app/src/main/res/values-hi/strings.xml | 2 -- app/src/main/res/values-hr/strings.xml | 2 -- app/src/main/res/values-hu/strings.xml | 2 -- app/src/main/res/values-in/strings.xml | 2 -- app/src/main/res/values-it/strings.xml | 2 -- app/src/main/res/values-iw/strings.xml | 2 -- app/src/main/res/values-ja/strings.xml | 2 -- app/src/main/res/values-lt/strings.xml | 2 -- app/src/main/res/values-lv/strings.xml | 2 -- app/src/main/res/values-mk/strings.xml | 2 -- app/src/main/res/values-ml/strings.xml | 2 -- app/src/main/res/values-nb-rNO/strings.xml | 2 -- app/src/main/res/values-nl/strings.xml | 2 -- app/src/main/res/values-pl/strings.xml | 2 -- app/src/main/res/values-pt-rBR/strings.xml | 2 -- app/src/main/res/values-pt/strings.xml | 2 -- app/src/main/res/values-ro/strings.xml | 2 -- app/src/main/res/values-ru/strings.xml | 2 -- app/src/main/res/values-sk/strings.xml | 2 -- app/src/main/res/values-sl/strings.xml | 2 -- app/src/main/res/values-sv/strings.xml | 2 -- app/src/main/res/values-ta/strings.xml | 2 -- app/src/main/res/values-th/strings.xml | 2 -- app/src/main/res/values-tr/strings.xml | 2 -- app/src/main/res/values-uk/strings.xml | 2 -- app/src/main/res/values-zh-rCN/strings.xml | 2 -- app/src/main/res/values-zh-rTW/strings.xml | 2 -- app/src/main/res/values/strings.xml | 2 -- 46 files changed, 1 insertion(+), 91 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2df2b061..4578fb8d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:82a8684cd8' + implementation 'com.github.SimpleMobileTools:Simple-Commons:f6ddbdf19b' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:4cdacdb701' diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index c17934ef..b2978157 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info -Anniversary - Birthday Add contact محادثة جديدة diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index c3f11cce..ee855362 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 7df5010d..290e7081 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Новая размова diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 47616094..70a6dd3a 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Нов разговор diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index ce71a01b..2b28493c 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Conversa nova diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index e1396605..94c28922 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info -Anniversary - Birthday Add contact Nová konverzace diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index a454771c..47ceaf24 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Ny Samtale diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 34bf0dfa..ef1e6592 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Neuer Chat diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index ca47b9b4..59a1c1a2 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Νέα συνομιλία diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 0fe0233a..80a9afe0 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 2d43a532..5390b8d2 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nueva conversación diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 0191062d..29fc017b 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Uus vestlus diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 3a005e3d..9f3fea5f 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Uusi keskustelu diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 02739ec0..b60bf6ed 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nouvelle conversation diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index d9360249..74e2baf1 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nova conversa diff --git a/app/src/main/res/values-gr/strings.xml b/app/src/main/res/values-gr/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-gr/strings.xml +++ b/app/src/main/res/values-gr/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index bdb618d9..1a15dec3 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nova konverzacija diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 56d023ef..9596df81 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Új beszélgetés diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 0114fd17..c588ade6 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Percakapan baru diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 8dbea2e8..be3500e3 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nuova conversazione diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 5aea6e56..bde484dc 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact שיחה חדשה diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index e30e48e0..c79b933f 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact 新しい会話 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index c6e40340..c81871cb 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Naujas pokalbis diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 57c11485..b950fb9c 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact പുതിയ സംഭാഷണം diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index d24196de..23d17a80 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Ny samtale diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1f81d211..25082283 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nieuw gesprek diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 68f2a813..b4614d82 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nowa rozmowa diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 10651dde..a9fec375 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nova conversa diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index ef7b118c..c34a2781 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nova conversa diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index cc8dcae3..ea0bd81e 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Conversaţie nouă diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a51ec34f..45ff6f73 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Новая переписка diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 5eed1812..1d7220c4 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Nová konverzácia diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 515d9eb9..8ccddaa0 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Ny konversation diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index c86cfd11..70846a4c 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact புதிய உரையாடல் diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 20b94088..d5cb871c 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index cf735d83..a0bc1bc4 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Yeni görüşme diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 3f14594f..c3d3955c 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact Нове листування diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 3fcd0d6d..82fbcf1c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact 新的对话 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 91f32cde..956f95f3 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact 新對話 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 316c9510..ed64af24 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -26,8 +26,6 @@ and %d others Contact info - Anniversary - Birthday Add contact New conversation From ad6abf7ccc980e3ba5042610c44b8797f61c5356 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 15:54:09 +0530 Subject: [PATCH 11/20] Set text in xml --- .../simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt | 1 - app/src/main/res/layout/item_attachment_vcard.xml | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index d30a594b..134a2be8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -385,7 +385,6 @@ class ThreadAdapter( } else { vcard_subtitle.beGone() } - vcard_view_contact.text = context.getString(R.string.view_contact_details) setOnClickListener { if (actModeCallback.isSelectable) { diff --git a/app/src/main/res/layout/item_attachment_vcard.xml b/app/src/main/res/layout/item_attachment_vcard.xml index 7d553efe..9fa559eb 100644 --- a/app/src/main/res/layout/item_attachment_vcard.xml +++ b/app/src/main/res/layout/item_attachment_vcard.xml @@ -46,10 +46,11 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/normal_margin" android:layout_marginTop="@dimen/small_margin" + android:text="@string/view_contact_details" + android:textColor="@color/color_primary" android:textSize="@dimen/smaller_text_size" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/vcard_photo" - app:layout_constraintTop_toBottomOf="@id/vcard_subtitle" - tools:text="View contact" /> + app:layout_constraintTop_toBottomOf="@id/vcard_subtitle" /> From 66363caf4c63f208930903908cc72af95138e9c4 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 15:59:31 +0530 Subject: [PATCH 12/20] Disable expand/collapse when there's only one item --- .../smsmessenger/adapters/VCardViewerAdapter.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index 96e56783..25c2eb29 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -10,10 +10,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions import com.bumptech.glide.request.RequestOptions -import com.simplemobiletools.commons.extensions.applyColorFilter -import com.simplemobiletools.commons.extensions.getProperTextColor -import com.simplemobiletools.commons.extensions.getTextSize -import com.simplemobiletools.commons.extensions.onGlobalLayout +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.SimpleContactsHelper import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity @@ -83,12 +80,15 @@ class VCardViewerAdapter( .into(this) } expand_collapse_icon.applyColorFilter(textColor) - setOnClickListener { - expandOrCollapseRow(view, item) + if (items.size > 1) { + setOnClickListener { + expandOrCollapseRow(view, item) + } } onGlobalLayout { if (items.size == 1) { expandOrCollapseRow(view, item) + view.expand_collapse_icon.beGone() } } } From 93848b18946cfaeea4722512ac87f7c323542412 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 16:12:16 +0530 Subject: [PATCH 13/20] Set proper expand/collapse drawable on recycle --- .../smsmessenger/adapters/VCardViewerAdapter.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index 25c2eb29..bbeeb1bf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -79,7 +79,16 @@ class VCardViewerAdapter( .transition(DrawableTransitionOptions.withCrossFade()) .into(this) } - expand_collapse_icon.applyColorFilter(textColor) + expand_collapse_icon.apply { + val expandCollapseDrawable = if (item.expanded) { + R.drawable.ic_collapse_up + } else { + R.drawable.ic_expand_down + } + setImageResource(expandCollapseDrawable) + applyColorFilter(textColor) + } + if (items.size > 1) { setOnClickListener { expandOrCollapseRow(view, item) From b6e21507c1ce5d056f924e9abb93e2ccb4949d87 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 16:32:04 +0530 Subject: [PATCH 14/20] Restructure code --- .../activities/VCardViewerActivity.kt | 2 +- .../adapters/VCardViewerAdapter.kt | 6 +-- .../smsmessenger/models/VCard.kt | 41 +++++++++++-------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt index 3b1bc15c..b8f2296b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt @@ -76,6 +76,6 @@ class VCardViewerActivity : SimpleActivity() { } private fun prepareData(vCards: List): List { - return vCards.map { VCardWrapper(it) } + return vCards.map { vCard -> VCardWrapper.from(this, vCard) } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt index bbeeb1bf..2b08b175 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/VCardViewerAdapter.kt @@ -20,7 +20,7 @@ import kotlinx.android.synthetic.main.item_vcard_contact.view.* import kotlinx.android.synthetic.main.item_vcard_contact_property.view.* class VCardViewerAdapter( - private val activity: SimpleActivity, private var items: MutableList, private val itemClick: (Any) -> Unit + activity: SimpleActivity, private var items: MutableList, private val itemClick: (Any) -> Unit ) : RecyclerView.Adapter() { private var fontSize = activity.getTextSize() @@ -53,7 +53,7 @@ class VCardViewerAdapter( } private fun setupVCardView(view: View, item: VCardWrapper) { - val name = item.getFullName() + val name = item.fullName view.apply { item_contact_name.apply { text = name @@ -121,7 +121,7 @@ class VCardViewerAdapter( } private fun expandOrCollapseRow(view: View, item: VCardWrapper) { - val properties = item.getVCardProperties(context = activity) + val properties = item.properties if (item.expanded) { collapseRow(view, properties, item) } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt index 23609674..64f67cc9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt @@ -12,28 +12,33 @@ private val displayedPropertyClasses = arrayOf( Telephone::class.java, Email::class.java, Organization::class.java, Birthday::class.java, Anniversary::class.java, Note::class.java ) -data class VCardWrapper(val vCard: VCard, var expanded: Boolean = false) { +data class VCardWrapper(val vCard: VCard, val fullName: String?, val properties: List, var expanded: Boolean = false) { - fun getFullName(): String? { - var formattedName = vCard.formattedName?.value - if (formattedName.isNullOrEmpty()) { - val structured = vCard.structuredName - val given = structured?.given - val family = structured.family - formattedName = if (family != null) { - given?.plus(" ")?.plus(family) - } else { - given + companion object { + private fun VCard.extractFullName(): String? { + var fullName = formattedName?.value + if (fullName.isNullOrEmpty()) { + val structured = structuredName + val given = structured?.given + val family = structured.family + fullName = if (family != null) { + given?.plus(" ")?.plus(family) + } else { + given + } } + return fullName } - return formattedName - } - fun getVCardProperties(context: Context): List { - return vCard.properties - .filter { displayedPropertyClasses.contains(it::class.java) } - .map { VCardPropertyWrapper.from(context, it) } - .distinctBy { it.value } + fun from(context: Context, vCard: VCard): VCardWrapper { + val properties = vCard.properties + .filter { displayedPropertyClasses.contains(it::class.java) } + .map { VCardPropertyWrapper.from(context, it) } + .distinctBy { it.value } + val fullName = vCard.extractFullName() + + return VCardWrapper(vCard, fullName, properties, expanded = false) + } } } From f7c9dfbc8e300d7d74dd3e06d19ac322dc52ccec Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 29 Aug 2022 16:35:05 +0530 Subject: [PATCH 15/20] Remove default argument --- .../kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt index 64f67cc9..c1869500 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/VCard.kt @@ -37,7 +37,7 @@ data class VCardWrapper(val vCard: VCard, val fullName: String?, val properties: .distinctBy { it.value } val fullName = vCard.extractFullName() - return VCardWrapper(vCard, fullName, properties, expanded = false) + return VCardWrapper(vCard, fullName, properties) } } } From 737189746e13d35bac380b1af51715341fcfbab4 Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 30 Aug 2022 16:15:24 +0530 Subject: [PATCH 16/20] Always use proper primary color --- .../simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt | 2 +- app/src/main/res/layout/item_attachment_vcard.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 134a2be8..baddb3ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -362,7 +362,7 @@ class ThreadAdapter( background.applyColorFilter(backgroundColor.getContrastColor()) vcard_title.setTextColor(textColor) vcard_subtitle.setTextColor(textColor) - vcard_view_contact.setTextColor(context.getLinkTextColor()) + view_contact_details.setTextColor(properPrimaryColor) } thread_mesage_attachments_holder.addView(vCardView) diff --git a/app/src/main/res/layout/item_attachment_vcard.xml b/app/src/main/res/layout/item_attachment_vcard.xml index 9fa559eb..36339f34 100644 --- a/app/src/main/res/layout/item_attachment_vcard.xml +++ b/app/src/main/res/layout/item_attachment_vcard.xml @@ -34,14 +34,14 @@ android:layout_marginStart="@dimen/normal_margin" android:textSize="@dimen/normal_text_size" android:visibility="gone" - app:layout_constraintBottom_toTopOf="@id/vcard_view_contact" + app:layout_constraintBottom_toTopOf="@id/view_contact_details" app:layout_constraintStart_toEndOf="@id/vcard_photo" app:layout_constraintTop_toBottomOf="@id/vcard_title" tools:text="and 6 others" tools:visibility="visible" /> Date: Tue, 30 Aug 2022 16:29:44 +0530 Subject: [PATCH 17/20] Update activity label --- app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c25e7105..be8e6c1a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -138,7 +138,7 @@ Date: Tue, 30 Aug 2022 16:42:49 +0530 Subject: [PATCH 18/20] Move common strings to simple-commons --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 2 +- app/src/main/res/layout/activity_vcard_viewer.xml | 2 +- app/src/main/res/values-ar/strings.xml | 2 -- app/src/main/res/values-az/strings.xml | 2 -- app/src/main/res/values-be/strings.xml | 2 -- app/src/main/res/values-bg/strings.xml | 2 -- app/src/main/res/values-ca/strings.xml | 2 -- app/src/main/res/values-cr/strings.xml | 2 -- app/src/main/res/values-cs/strings.xml | 2 -- app/src/main/res/values-da/strings.xml | 2 -- app/src/main/res/values-de/strings.xml | 2 -- app/src/main/res/values-el/strings.xml | 2 -- app/src/main/res/values-eo/strings.xml | 2 -- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-et/strings.xml | 2 -- app/src/main/res/values-fi/strings.xml | 2 -- app/src/main/res/values-fr/strings.xml | 2 -- app/src/main/res/values-gl/strings.xml | 2 -- app/src/main/res/values-gr/strings.xml | 2 -- app/src/main/res/values-hi/strings.xml | 2 -- app/src/main/res/values-hr/strings.xml | 2 -- app/src/main/res/values-hu/strings.xml | 2 -- app/src/main/res/values-in/strings.xml | 2 -- app/src/main/res/values-it/strings.xml | 2 -- app/src/main/res/values-iw/strings.xml | 2 -- app/src/main/res/values-ja/strings.xml | 2 -- app/src/main/res/values-lt/strings.xml | 2 -- app/src/main/res/values-lv/strings.xml | 2 -- app/src/main/res/values-mk/strings.xml | 2 -- app/src/main/res/values-ml/strings.xml | 2 -- app/src/main/res/values-nb-rNO/strings.xml | 2 -- app/src/main/res/values-nl/strings.xml | 2 -- app/src/main/res/values-pl/strings.xml | 2 -- app/src/main/res/values-pt-rBR/strings.xml | 2 -- app/src/main/res/values-pt/strings.xml | 2 -- app/src/main/res/values-ro/strings.xml | 2 -- app/src/main/res/values-ru/strings.xml | 2 -- app/src/main/res/values-sk/strings.xml | 2 -- app/src/main/res/values-sl/strings.xml | 2 -- app/src/main/res/values-sv/strings.xml | 2 -- app/src/main/res/values-ta/strings.xml | 2 -- app/src/main/res/values-th/strings.xml | 2 -- app/src/main/res/values-tr/strings.xml | 2 -- app/src/main/res/values-uk/strings.xml | 2 -- app/src/main/res/values-zh-rCN/strings.xml | 2 -- app/src/main/res/values-zh-rTW/strings.xml | 2 -- app/src/main/res/values/strings.xml | 2 -- 48 files changed, 3 insertions(+), 93 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4578fb8d..043d29a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:f6ddbdf19b' + implementation 'com.github.SimpleMobileTools:Simple-Commons:2122bbc6a3' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:4cdacdb701' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index be8e6c1a..372a05cd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -138,7 +138,7 @@ diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b2978157..eeebe406 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact محادثة جديدة إضافة جهة اتصال أو رقم … diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index ee855362..33fb6e50 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 290e7081..7da4ac30 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Новая размова Дадаць кантакт альбо нумар… diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 70a6dd3a..8699e0fe 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Нов разговор Добавете контакт или номер… diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 2b28493c..3020e3dd 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Conversa nova Afegeix un contacte o número… diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 94c28922..bae416c1 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nová konverzace Přidejte kontakt nebo číslo… diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 47ceaf24..9ffe5f57 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Ny Samtale Tilføj kontakt eller nummer… diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ef1e6592..c3c03b91 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Neuer Chat Kontakt oder Nummer hinzufügen … diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 59a1c1a2..a4cc9963 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Νέα συνομιλία Προσθήκη επαφής ή αριθμού… diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 80a9afe0..1e59e6ed 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5390b8d2..689f7acc 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nueva conversación Escribe contacto o número… diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 29fc017b..6ca9ee5f 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Uus vestlus Add Contact or Number… diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 9f3fea5f..86fa2c63 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Uusi keskustelu Lisää yhteystieto tai numero… diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index b60bf6ed..7c74ac8f 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nouvelle conversation Ajouter un contact ou un numéro… diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 74e2baf1..85b6ca02 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nova conversa Engadir contacto ou número… diff --git a/app/src/main/res/values-gr/strings.xml b/app/src/main/res/values-gr/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-gr/strings.xml +++ b/app/src/main/res/values-gr/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 1a15dec3..d96a714f 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nova konverzacija Dodaj kontakt ili broj … diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 9596df81..8c8bd17d 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Új beszélgetés Névjegy vagy szám hozzáadása… diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index c588ade6..8b8b650f 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Percakapan baru Tambahkan Kontak atau Nomor… diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index be3500e3..f3b750f6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nuova conversazione Inserisci contatto o numero… diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index bde484dc..bd49490f 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact שיחה חדשה הוסף איש קשר או מספר… diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index c79b933f..2584a57b 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact 新しい会話 連絡先や電話番号を追加… diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index c81871cb..ff890fd0 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Naujas pokalbis Pridėti kontaktą arba numerį… diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index b950fb9c..1f838afe 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact പുതിയ സംഭാഷണം കോൺടാക്റ്റ് അല്ലെങ്കിൽ നമ്പർ ചേർക്കുക… diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 23d17a80..e455377f 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Ny samtale Legg til kontakt eller nummer … diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 25082283..a43a5bdd 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nieuw gesprek Contact of nummer toevoegen… diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index b4614d82..3fa2f694 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nowa rozmowa Dodaj kontakt lub numer… diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index a9fec375..9a5c10e9 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nova conversa Adicionar contato ou número… diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index c34a2781..5daa9a7f 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nova conversa Adicionar contacto ou número… diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index ea0bd81e..18a904bc 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Conversaţie nouă Adaugă contact sau număr de telefon… diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 45ff6f73..34a78997 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Новая переписка Добавить контакт или номер… diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 1d7220c4..d7ea5e50 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Nová konverzácia Pridať kontakt alebo číslo… diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 8ccddaa0..fec82ad4 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Ny konversation Lägg till kontakt eller nummer… diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 70846a4c..8ebd9379 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact புதிய உரையாடல் தொடர்பு அல்லது எண்ணைச் சேர்க்கவும்… diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index d5cb871c..c40166de 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index a0bc1bc4..2d8828e6 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Yeni görüşme Kişi veya Numara Ekle… diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index c3d3955c..a54a46c5 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact Нове листування Додати контакт аба номер… diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 82fbcf1c..3dae46c2 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact 新的对话 添加联系人或者号码… diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 956f95f3..da489f1c 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact 新對話 新增聯絡對象或電話號碼…… diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ed64af24..762434d8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -25,8 +25,6 @@ and %d other and %d others - Contact info - Add contact New conversation Add Contact or Number… From 91791254768f7a2d071d7e9968b6435aedc761a1 Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 30 Aug 2022 19:35:00 +0530 Subject: [PATCH 19/20] Use `sendEmailIntent` extension from commons --- app/build.gradle | 2 +- .../activities/VCardViewerActivity.kt | 4 ++-- .../smsmessenger/extensions/Activity.kt | 16 ---------------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 043d29a2..9e4b754f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:2122bbc6a3' + implementation 'com.github.SimpleMobileTools:Simple-Commons:141660c8f9' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:4cdacdb701' diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt index b8f2296b..f643b8a4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/VCardViewerActivity.kt @@ -4,11 +4,11 @@ import android.content.Intent import android.net.Uri import android.os.Bundle import com.simplemobiletools.commons.extensions.normalizePhoneNumber +import com.simplemobiletools.commons.extensions.sendEmailIntent import com.simplemobiletools.commons.helpers.NavigationIcon import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.adapters.VCardViewerAdapter import com.simplemobiletools.smsmessenger.extensions.dialNumber -import com.simplemobiletools.smsmessenger.extensions.sendMail import com.simplemobiletools.smsmessenger.helpers.EXTRA_VCARD_URI import com.simplemobiletools.smsmessenger.helpers.parseVCardFromUri import com.simplemobiletools.smsmessenger.models.VCardPropertyWrapper @@ -71,7 +71,7 @@ class VCardViewerActivity : SimpleActivity() { private fun handleClick(property: VCardPropertyWrapper) { when (property.property) { is Telephone -> dialNumber(property.value.normalizePhoneNumber()) - is Email -> sendMail(property.value) + is Email -> sendEmailIntent(property.value) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt index e6200b49..1d165091 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Activity.kt @@ -24,19 +24,3 @@ fun Activity.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) { } } } - -fun Activity.sendMail(email: String) { - hideKeyboard() - Intent(Intent.ACTION_SENDTO).apply { - data = Uri.parse("mailto:") - putExtra(Intent.EXTRA_EMAIL, email) - - try { - startActivity(this) - } catch (e: ActivityNotFoundException) { - toast(R.string.no_app_found) - } catch (e: Exception) { - showErrorToast(e) - } - } -} From bf1235037fc6841b54bb3fc6447eaa3c4239eb38 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Wed, 31 Aug 2022 12:13:10 +0200 Subject: [PATCH 20/20] updating the slovak translation --- app/src/main/res/values-sk/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index d7ea5e50..bb5913d2 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -22,8 +22,8 @@ Nepodarilo sa zmenšiť obrázok na požadovanú veľkosť - and %d other - and %d others + a %d ďalší + a %d ďalší Nová konverzácia