From daf11dc6fd167e6f7e811625dbd8ae13dd693295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 7 Jul 2023 10:48:35 +0200 Subject: [PATCH 01/45] Properly look up participants in MMS group conversations Application was always picking first participant when tapping on avatars in conversations. It was also using first participant for MMS notifications. This stores sender's phone number in the database, so it can be used to look up correct participant in the list of participants. If matching on number fails, matching on name is attempted. If both of these fail, it falls back to previous behavior, which is just picking the first participant. This may also be connected to #32, but I am not sure, since this should just be related to behavior when tapping on avatars. Mixing up avatars in the conversation should be a different issue. This closes #433, closes #500, closes #384 --- .../smsmessenger/activities/ThreadActivity.kt | 1 + .../smsmessenger/adapters/ThreadAdapter.kt | 2 +- .../smsmessenger/databases/MessagesDatabase.kt | 11 ++++++++++- .../smsmessenger/extensions/Context.kt | 11 +++++++---- .../smsmessenger/models/Message.kt | 8 ++++++++ .../smsmessenger/receivers/MmsReceiver.kt | 2 +- .../smsmessenger/receivers/SmsReceiver.kt | 17 ++++++++++++++++- 7 files changed, 44 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt index 08f251ac..62e03a05 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -1606,6 +1606,7 @@ class ThreadActivity : SimpleActivity() { threadId = threadId, isMMS = isMmsMessage(text), attachment = MessageAttachment(messageId, text, buildMessageAttachments(messageId)), + senderPhoneNumber = "", senderName = "", senderPhotoUri = "", subscriptionId = subscriptionId, 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 95007916..c23cf7b4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -283,7 +283,7 @@ class ThreadAdapter( view.apply { thread_message_sender_photo.beVisible() thread_message_sender_photo.setOnClickListener { - val contact = message.participants.first() + val contact = message.getSender()!! context.getContactFromAddress(contact.phoneNumbers.first().normalizedNumber) { if (it != null) { activity.startContactDetailsIntent(it) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt index 030d6be6..fca0754b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -17,7 +17,7 @@ import com.simplemobiletools.smsmessenger.models.Conversation import com.simplemobiletools.smsmessenger.models.Message import com.simplemobiletools.smsmessenger.models.MessageAttachment -@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 6) +@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 7) @TypeConverters(Converters::class) abstract class MessagesDatabase : RoomDatabase() { @@ -43,6 +43,7 @@ abstract class MessagesDatabase : RoomDatabase() { .addMigrations(MIGRATION_3_4) .addMigrations(MIGRATION_4_5) .addMigrations(MIGRATION_5_6) + .addMigrations(MIGRATION_6_7) .build() } } @@ -106,5 +107,13 @@ abstract class MessagesDatabase : RoomDatabase() { } } } + + private val MIGRATION_6_7 = object : Migration(6, 7) { + override fun migrate(database: SupportSQLiteDatabase) { + database.apply { + execSQL("ALTER TABLE messages ADD COLUMN sender_phone_number TEXT NOT NULL DEFAULT ''") + } + } + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index f0faebb5..c9619701 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -116,7 +116,8 @@ fun Context.getMessages( SimpleContact(0, 0, participantPhoto.name, photoUri, arrayListOf(phoneNumber), ArrayList(), ArrayList()) } val isMMS = false - val message = Message(id, body, type, status, ArrayList(participants), date, read, thread, isMMS, null, senderName, photoUri, subscriptionId) + val message = + Message(id, body, type, status, ArrayList(participants), date, read, thread, isMMS, null, senderNumber, senderName, photoUri, subscriptionId) messages.add(message) } @@ -189,17 +190,19 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, val isMMS = true val attachment = getMmsAttachment(mmsId, getImageResolutions) val body = attachment.text + var senderNumber = "" var senderName = "" var senderPhotoUri = "" if (type != Mms.MESSAGE_BOX_SENT && type != Mms.MESSAGE_BOX_FAILED) { - val number = getMMSSender(mmsId) - val namePhoto = getNameAndPhotoFromPhoneNumber(number) + senderNumber = getMMSSender(mmsId) + val namePhoto = getNameAndPhotoFromPhoneNumber(senderNumber) senderName = namePhoto.name senderPhotoUri = namePhoto.photoUri ?: "" } - val message = Message(mmsId, body, type, status, participants, date, read, threadId, isMMS, attachment, senderName, senderPhotoUri, subscriptionId) + val message = + Message(mmsId, body, type, status, participants, date, read, threadId, isMMS, attachment, senderNumber, senderName, senderPhotoUri, subscriptionId) messages.add(message) participants.forEach { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt index 8816d2d8..d4f6de58 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt @@ -18,6 +18,7 @@ data class Message( @ColumnInfo(name = "thread_id") val threadId: Long, @ColumnInfo(name = "is_mms") val isMMS: Boolean, @ColumnInfo(name = "attachment") val attachment: MessageAttachment?, + @ColumnInfo(name = "sender_phone_number") val senderPhoneNumber: String, @ColumnInfo(name = "sender_name") var senderName: String, @ColumnInfo(name = "sender_photo_uri") val senderPhotoUri: String, @ColumnInfo(name = "subscription_id") var subscriptionId: Int, @@ -28,6 +29,11 @@ data class Message( fun millis() = date * 1000L + fun getSender(): SimpleContact? = + participants.firstOrNull { it.doesHavePhoneNumber(senderPhoneNumber) } + ?: participants.firstOrNull { it.name == senderName } + ?: participants.firstOrNull() + companion object { fun getStableId(message: Message): Long { @@ -37,6 +43,7 @@ data class Message( result = 31 * result + message.threadId.hashCode() result = 31 * result + message.isMMS.hashCode() result = 31 * result + (message.attachment?.hashCode() ?: 0) + result = 31 * result + message.senderPhoneNumber.hashCode() result = 31 * result + message.senderName.hashCode() result = 31 * result + message.senderPhotoUri.hashCode() result = 31 * result + message.isScheduled.hashCode() @@ -53,6 +60,7 @@ data class Message( old.date == new.date && old.isMMS == new.isMMS && old.attachment == new.attachment && + old.senderPhoneNumber == new.senderPhoneNumber && old.senderName == new.senderName && old.senderPhotoUri == new.senderPhotoUri && old.isScheduled == new.isScheduled diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt index 13c28e59..57f35872 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt @@ -22,7 +22,7 @@ class MmsReceiver : com.klinker.android.send_message.MmsReceivedReceiver() { override fun onMessageReceived(context: Context, messageUri: Uri) { val mms = context.getLatestMMS() ?: return - val address = mms.participants.firstOrNull()?.phoneNumbers?.first()?.normalizedNumber ?: "" + val address = mms.getSender()?.phoneNumbers?.first()?.normalizedNumber ?: "" val size = context.resources.getDimension(R.dimen.notification_large_icon_size).toInt() ensureBackgroundThread { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt index 9b29db93..d947190e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -83,7 +83,22 @@ class SmsReceiver : BroadcastReceiver() { val messageDate = (date / 1000).toInt() val message = - Message(newMessageId, body, type, status, participants, messageDate, false, threadId, false, null, senderName, photoUri, subscriptionId) + Message( + newMessageId, + body, + type, + status, + participants, + messageDate, + false, + threadId, + false, + null, + address, + senderName, + photoUri, + subscriptionId + ) context.messagesDB.insertOrUpdate(message) refreshMessages() context.showReceivedMessageNotification(newMessageId, address, body, threadId, bitmap) From e3bf8541df37c8a8a009397203a28c8bfaaac79c Mon Sep 17 00:00:00 2001 From: Wilson Date: Fri, 7 Jul 2023 15:13:23 -0400 Subject: [PATCH 02/45] update last conversation message after replying from notification. #ISSUE-675 --- .../smsmessenger/receivers/DirectReplyReceiver.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt index d38c4161..f9c1d845 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt @@ -44,6 +44,8 @@ class DirectReplyReceiver : BroadcastReceiver() { if (message != null) { context.messagesDB.insertOrUpdate(message) messageId = message.id + + context.updateLastConversationMessage(threadId) } } catch (e: Exception) { context.showErrorToast(e) From 674a467694f2c3673a702edbdad9476a9dbd4233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 14:11:41 +0200 Subject: [PATCH 03/45] Add support for blocking keywords for incoming messages This adds support for filtering incoming messages based on message body by checking if it contains any of the blocked keywords (case insensitive). Regex and patterns are not supported at the moment. NOTE: This does not currently support MMS, only SMS. This closes #33 --- app/src/main/AndroidManifest.xml | 7 + .../ManageBlockedKeywordsActivity.kt | 89 +++++++++++ .../activities/SettingsActivity.kt | 15 ++ .../dialogs/AddBlockedKeywordDialog.kt | 43 +++++ .../dialogs/ManageBlockedKeywordsAdapter.kt | 148 ++++++++++++++++++ .../smsmessenger/helpers/Config.kt | 12 ++ .../smsmessenger/helpers/Constants.kt | 1 + .../smsmessenger/receivers/SmsReceiver.kt | 14 ++ .../activity_manage_blocked_keywords.xml | 67 ++++++++ app/src/main/res/layout/activity_settings.xml | 15 ++ .../res/layout/dialog_add_blocked_keyword.xml | 25 +++ .../layout/item_manage_blocked_keyword.xml | 37 +++++ .../main/res/menu/cab_blocked_keywords.xml | 14 ++ .../res/menu/menu_add_blocked_keyword.xml | 9 ++ 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 | 7 +- app/src/main/res/values-cr/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 | 7 +- 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 | 7 +- app/src/main/res/values-et/strings.xml | 7 +- app/src/main/res/values-fi/strings.xml | 7 +- app/src/main/res/values-fr/strings.xml | 7 +- app/src/main/res/values-gl/strings.xml | 7 +- app/src/main/res/values-hi/strings.xml | 5 + app/src/main/res/values-hr/strings.xml | 7 +- app/src/main/res/values-hu/strings.xml | 5 + app/src/main/res/values-in/strings.xml | 5 + app/src/main/res/values-is/strings.xml | 5 + app/src/main/res/values-it/strings.xml | 7 +- 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-lv/strings.xml | 5 + app/src/main/res/values-mk/strings.xml | 5 + app/src/main/res/values-ml/strings.xml | 5 + app/src/main/res/values-nb-rNO/strings.xml | 7 +- app/src/main/res/values-nl/strings.xml | 7 +- app/src/main/res/values-pa-rPK/strings.xml | 5 + app/src/main/res/values-pl/strings.xml | 7 +- app/src/main/res/values-pt-rBR/strings.xml | 7 +- app/src/main/res/values-pt/strings.xml | 7 +- app/src/main/res/values-ro/strings.xml | 5 + app/src/main/res/values-ru/strings.xml | 7 +- app/src/main/res/values-sk/strings.xml | 5 + app/src/main/res/values-sl/strings.xml | 5 + app/src/main/res/values-sr/strings.xml | 5 + app/src/main/res/values-sv/strings.xml | 7 +- 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 | 7 +- app/src/main/res/values-uk/strings.xml | 7 +- app/src/main/res/values-zh-rCN/strings.xml | 7 +- app/src/main/res/values-zh-rTW/strings.xml | 5 + app/src/main/res/values/strings.xml | 5 + 61 files changed, 752 insertions(+), 21 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ManageBlockedKeywordsActivity.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/AddBlockedKeywordDialog.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ManageBlockedKeywordsAdapter.kt create mode 100644 app/src/main/res/layout/activity_manage_blocked_keywords.xml create mode 100644 app/src/main/res/layout/dialog_add_blocked_keyword.xml create mode 100644 app/src/main/res/layout/item_manage_blocked_keyword.xml create mode 100644 app/src/main/res/menu/cab_blocked_keywords.xml create mode 100644 app/src/main/res/menu/menu_add_blocked_keyword.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3820008d..aa49b1c0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -128,6 +128,13 @@ android:label="@string/blocked_numbers" android:parentActivityName=".activities.SettingsActivity" /> + + + when (menuItem.itemId) { + R.id.add_blocked_keyword -> { + addOrEditBlockedKeyword() + true + } + + else -> false + } + } + } + + override fun refreshItems() { + updateBlockedKeywords() + } + + private fun updateBlockedKeywords() { + ensureBackgroundThread { + val blockedKeywords = config.blockedKeywords + runOnUiThread { + ManageBlockedKeywordsAdapter(this, blockedKeywords.toArrayList(), this, manage_blocked_keywords_list) { + addOrEditBlockedKeyword(it as String) + }.apply { + manage_blocked_keywords_list.adapter = this + } + + manage_blocked_keywords_placeholder.beVisibleIf(blockedKeywords.isEmpty()) + manage_blocked_keywords_placeholder_2.beVisibleIf(blockedKeywords.isEmpty()) + } + } + } + + private fun addOrEditBlockedKeyword(keyword: String? = null) { + AddBlockedKeywordDialog(this, keyword) { + updateBlockedKeywords() + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt index d97e67d0..38cc7388 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt @@ -37,6 +37,7 @@ class SettingsActivity : SimpleActivity() { setupUseEnglish() setupLanguage() setupManageBlockedNumbers() + setupManageBlockedKeywords() setupChangeDateTimeFormat() setupFontSize() setupShowCharacterCounter() @@ -126,6 +127,20 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupManageBlockedKeywords() { + settings_manage_blocked_keywords.text = addLockedLabelIfNeeded(R.string.manage_blocked_keywords) + + settings_manage_blocked_keywords_holder.setOnClickListener { + if (isOrWasThankYouInstalled()) { + Intent(this, ManageBlockedKeywordsActivity::class.java).apply { + startActivity(this) + } + } else { + FeatureLockedDialog(this) { } + } + } + } + private fun setupChangeDateTimeFormat() { settings_change_date_time_format_holder.setOnClickListener { ChangeDateTimeFormatDialog(this) { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/AddBlockedKeywordDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/AddBlockedKeywordDialog.kt new file mode 100644 index 00000000..2f55e791 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/AddBlockedKeywordDialog.kt @@ -0,0 +1,43 @@ +package com.simplemobiletools.smsmessenger.dialogs + +import androidx.appcompat.app.AlertDialog +import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.extensions.getAlertDialogBuilder +import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.commons.extensions.showKeyboard +import com.simplemobiletools.commons.extensions.value +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.extensions.config +import kotlinx.android.synthetic.main.dialog_add_blocked_keyword.view.add_blocked_keyword_edittext + +class AddBlockedKeywordDialog(val activity: BaseSimpleActivity, private val originalKeyword: String? = null, val callback: () -> Unit) { + init { + val view = activity.layoutInflater.inflate(R.layout.dialog_add_blocked_keyword, null).apply { + if (originalKeyword != null) { + add_blocked_keyword_edittext.setText(originalKeyword) + } + } + + activity.getAlertDialogBuilder() + .setPositiveButton(R.string.ok, null) + .setNegativeButton(R.string.cancel, null) + .apply { + activity.setupDialogStuff(view, this) { alertDialog -> + alertDialog.showKeyboard(view.add_blocked_keyword_edittext) + alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { + val newBlockedKeyword = view.add_blocked_keyword_edittext.value + if (originalKeyword != null && newBlockedKeyword != originalKeyword) { + activity.config.removeBlockedKeyword(originalKeyword) + } + + if (newBlockedKeyword.isNotEmpty()) { + activity.config.addBlockedKeyword(newBlockedKeyword) + } + + callback() + alertDialog.dismiss() + } + } + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ManageBlockedKeywordsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ManageBlockedKeywordsAdapter.kt new file mode 100644 index 00000000..51c7a855 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ManageBlockedKeywordsAdapter.kt @@ -0,0 +1,148 @@ +package com.simplemobiletools.smsmessenger.dialogs + +import android.view.* +import android.widget.PopupMenu +import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter +import com.simplemobiletools.commons.extensions.copyToClipboard +import com.simplemobiletools.commons.extensions.getPopupMenuTheme +import com.simplemobiletools.commons.extensions.getProperTextColor +import com.simplemobiletools.commons.extensions.setupViewBackground +import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener +import com.simplemobiletools.commons.views.MyRecyclerView +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.extensions.config +import kotlinx.android.synthetic.main.item_manage_blocked_keyword.view.manage_blocked_keyword_holder +import kotlinx.android.synthetic.main.item_manage_blocked_keyword.view.manage_blocked_keyword_title +import kotlinx.android.synthetic.main.item_manage_blocked_keyword.view.overflow_menu_anchor +import kotlinx.android.synthetic.main.item_manage_blocked_keyword.view.overflow_menu_icon + +class ManageBlockedKeywordsAdapter( + activity: BaseSimpleActivity, var blockedKeywords: ArrayList, val listener: RefreshRecyclerViewListener?, + recyclerView: MyRecyclerView, itemClick: (Any) -> Unit +) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) { + init { + setupDragListener(true) + } + + override fun getActionMenuId() = R.menu.cab_blocked_keywords + + override fun prepareActionMode(menu: Menu) { + menu.apply { + findItem(R.id.cab_copy_keyword).isVisible = isOneItemSelected() + } + } + + override fun actionItemPressed(id: Int) { + if (selectedKeys.isEmpty()) { + return + } + + when (id) { + R.id.cab_copy_keyword -> copyKeywordToClipboard() + R.id.cab_delete -> deleteSelection() + } + } + + override fun getSelectableItemCount() = blockedKeywords.size + + override fun getIsItemSelectable(position: Int) = true + + override fun getItemSelectionKey(position: Int) = blockedKeywords.getOrNull(position)?.hashCode() + + override fun getItemKeyPosition(key: Int) = blockedKeywords.indexOfFirst { it.hashCode() == key } + + override fun onActionModeCreated() {} + + override fun onActionModeDestroyed() {} + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_manage_blocked_keyword, parent) + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val blockedKeyword = blockedKeywords[position] + holder.bindView(blockedKeyword, true, true) { itemView, _ -> + setupView(itemView, blockedKeyword) + } + bindViewHolder(holder) + } + + override fun getItemCount() = blockedKeywords.size + + private fun getSelectedItems() = blockedKeywords.filter { selectedKeys.contains(it.hashCode()) } + + private fun setupView(view: View, blockedKeyword: String) { + view.apply { + setupViewBackground(activity) + manage_blocked_keyword_holder?.isSelected = selectedKeys.contains(blockedKeyword.hashCode()) + manage_blocked_keyword_title.apply { + text = blockedKeyword + setTextColor(textColor) + } + + overflow_menu_icon.drawable.apply { + mutate() + setTint(activity.getProperTextColor()) + } + + overflow_menu_icon.setOnClickListener { + showPopupMenu(overflow_menu_anchor, blockedKeyword) + } + } + } + + private fun showPopupMenu(view: View, blockedKeyword: String) { + finishActMode() + val theme = activity.getPopupMenuTheme() + val contextTheme = ContextThemeWrapper(activity, theme) + + PopupMenu(contextTheme, view, Gravity.END).apply { + inflate(getActionMenuId()) + setOnMenuItemClickListener { item -> + val blockedKeywordId = blockedKeyword.hashCode() + when (item.itemId) { + R.id.cab_copy_keyword -> { + executeItemMenuOperation(blockedKeywordId) { + copyKeywordToClipboard() + } + } + + R.id.cab_delete -> { + executeItemMenuOperation(blockedKeywordId) { + deleteSelection() + } + } + } + true + } + show() + } + } + + private fun executeItemMenuOperation(blockedKeywordId: Int, callback: () -> Unit) { + selectedKeys.add(blockedKeywordId) + callback() + selectedKeys.remove(blockedKeywordId) + } + + private fun copyKeywordToClipboard() { + val selectedKeyword = getSelectedItems().firstOrNull() ?: return + activity.copyToClipboard(selectedKeyword) + finishActMode() + } + + private fun deleteSelection() { + val deleteBlockedKeywords = HashSet(selectedKeys.size) + val positions = getSelectedItemPositions() + + getSelectedItems().forEach { + deleteBlockedKeywords.add(it) + activity.config.removeBlockedKeyword(it) + } + + blockedKeywords.removeAll(deleteBlockedKeywords) + removeSelectedItems(positions) + if (blockedKeywords.isEmpty()) { + listener?.refreshItems() + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt index b9b5c85b..18859f76 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt @@ -68,6 +68,18 @@ class Config(context: Context) : BaseConfig(context) { pinnedConversations = pinnedConversations.minus(conversations.map { it.threadId.toString() }) } + var blockedKeywords: Set + get() = prefs.getStringSet(BLOCKED_KEYWORDS, HashSet())!! + set(blockedKeywords) = prefs.edit().putStringSet(BLOCKED_KEYWORDS, blockedKeywords).apply() + + fun addBlockedKeyword(keyword: String) { + blockedKeywords = blockedKeywords.plus(keyword) + } + + fun removeBlockedKeyword(keyword: String) { + blockedKeywords = blockedKeywords.minus(keyword) + } + var exportSms: Boolean get() = prefs.getBoolean(EXPORT_SMS, true) set(exportSms) = prefs.edit().putBoolean(EXPORT_SMS, exportSms).apply() 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 4db9a2ad..2bbdc2bb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -25,6 +25,7 @@ const val SEND_LONG_MESSAGE_MMS = "send_long_message_mms" const val SEND_GROUP_MESSAGE_MMS = "send_group_message_mms" const val MMS_FILE_SIZE_LIMIT = "mms_file_size_limit" const val PINNED_CONVERSATIONS = "pinned_conversations" +const val BLOCKED_KEYWORDS = "blocked_keywords" const val EXPORT_SMS = "export_sms" const val EXPORT_MMS = "export_mms" const val EXPORT_MIME_TYPE = "application/json" diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt index d947190e..61450edd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -57,6 +57,10 @@ class SmsReceiver : BroadcastReceiver() { private fun handleMessage( context: Context, address: String, subject: String, body: String, date: Long, read: Int, threadId: Long, type: Int, subscriptionId: Int, status: Int ) { + if (isMessageFilteredOut(context, address, subject, body)) { + return + } + val photoUri = SimpleContactsHelper(context).getPhotoUriFromPhoneNumber(address) val bitmap = context.getNotificationBitmap(photoUri) Handler(Looper.getMainLooper()).post { @@ -106,4 +110,14 @@ class SmsReceiver : BroadcastReceiver() { } } } + + private fun isMessageFilteredOut(context: Context, address: String, subject: String, body: String): Boolean { + for (blockedKeyword in context.config.blockedKeywords) { + if (body.contains(blockedKeyword, ignoreCase = true)) { + return true + } + } + + return false + } } diff --git a/app/src/main/res/layout/activity_manage_blocked_keywords.xml b/app/src/main/res/layout/activity_manage_blocked_keywords.xml new file mode 100644 index 00000000..c5ca8a11 --- /dev/null +++ b/app/src/main/res/layout/activity_manage_blocked_keywords.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 99dfaa9b..7f7f562e 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -146,6 +146,21 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_manage_blocked_keyword.xml b/app/src/main/res/layout/item_manage_blocked_keyword.xml new file mode 100644 index 00000000..269a6c79 --- /dev/null +++ b/app/src/main/res/layout/item_manage_blocked_keyword.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/app/src/main/res/menu/cab_blocked_keywords.xml b/app/src/main/res/menu/cab_blocked_keywords.xml new file mode 100644 index 00000000..6b366308 --- /dev/null +++ b/app/src/main/res/menu/cab_blocked_keywords.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/app/src/main/res/menu/menu_add_blocked_keyword.xml b/app/src/main/res/menu/menu_add_blocked_keyword.xml new file mode 100644 index 00000000..53c85055 --- /dev/null +++ b/app/src/main/res/menu/menu_add_blocked_keyword.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 9c2555fc..df334548 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -77,6 +77,11 @@ %d رسائل + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword رؤية اشعارات شاشة القفل المرسل والرسالة المرسل فقط @@ -119,4 +124,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 669639ec..49ff6e62 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 80dabae2..be514ce6 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -71,6 +71,11 @@ %d паведамленняў + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Паказ апавяшчэнняў на экране блакавання Адпраўнік і паведамленне Толькі адпраўнік diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 50d6c913..8e3574da 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -65,6 +65,11 @@ %d съобщения + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Видимост на известие за съобщение при заключен екран Изпращач и съобщение Само изпращач diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 18e938e5..104234c1 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -65,6 +65,11 @@ %d missatges + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilitat de notificacions a la pantalla de bloqueig Remitent i missatge Només el remitent @@ -107,4 +112,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-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 669639ec..49ff6e62 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 56ee7077..1f4aab79 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -68,6 +68,11 @@ %d zpráv + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Viditelnost upozornění na uzamčené obrazovce Odesílatel a zpráva Pouze odesílatel @@ -110,4 +115,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 a7b1a837..62713c61 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -65,6 +65,11 @@ %d beskeder + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Synlighed af meddelelse på låseskærmen Afsender og meddelelse Kun afsender diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index dd571c63..ede1c631 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -65,6 +65,11 @@ %d Nachrichten + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Sichtbarkeit von Benachrichtigungen auf dem Sperrbildschirm Absender und Nachricht Nur Absender @@ -107,4 +112,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 5e613921..b2c559e9 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -65,6 +65,11 @@ %d μηνύματα + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Εμφάνιση ειδοπ/σεων σε Κλειδωμένη οθόνη Αποστολέας και μήνυμα Αποστολέας μόνο diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 1f3ce244..47cc5e04 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -65,6 +65,11 @@ %d mesaĝoj + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sendinto kaj mesaĝo Nur sendinto diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f4b25568..49d4c418 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -68,6 +68,11 @@ %d mensajes + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilidad de las notificaciones en la pantalla de bloqueo Remitente y mensaje Solamente el remitente @@ -110,4 +115,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 d23562ae..a9eb99ef 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -65,6 +65,11 @@ %d sõnumeid + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Teavituse nähtavus lukustusvaates Saatja ja sõnum Ainult saatja @@ -107,4 +112,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 5912ef49..78ecb0be 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -65,6 +65,11 @@ %d viestiä + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lukitusnäytön ilmoitusten näkyvyys Lähettäjä ja viesti Vain lähettäjä @@ -107,4 +112,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 361ffcd5..19607f03 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -68,6 +68,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilité des notifications sur l\'écran de verrouillage Expéditeur et message Expéditeur uniquement @@ -110,4 +115,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 135b326d..8446a467 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -65,6 +65,11 @@ %d mensaxes + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilidade das notificacións na pantalla de bloqueo Remitente e mensaxe Só remitente @@ -107,4 +112,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-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 669639ec..49ff6e62 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 4adf51bd..21e88f69 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -68,6 +68,11 @@ %d poruka + Riječ + Blokirane riječi + Upravljanje blokiranim riječima + Ne blokirate niti jednu riječ. Ovdje možete dodati riječi kako biste blokirali poruke koje ih sadrže. + Dodaj blokiranu riječ Zaključaj vidljivost ekranskih obavijesti Pošiljatelj u poruka Samo pošiljatelj @@ -110,4 +115,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 5d03b980..ab34f397 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -65,6 +65,11 @@ %d üzeneteket + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Értesítés láthatósága zárolt képernyőnél Feladó és üzenet Csak a feladó diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index dd1e2656..4ef6d665 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -62,6 +62,11 @@ %d pesan + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Keterlihatan notifikasi layar kunci Pengirim dan pesan Hanya pengirim diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 5b0d3463..c7ac4b67 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f7e8ea3a..3449ba20 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -68,6 +68,11 @@ %d messaggi + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilità schermata di blocco Mittente e messaggio Solo mittente @@ -110,4 +115,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 895a9030..92792678 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -71,6 +71,11 @@ %d הודעות + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword נראות התראות מסך נעילה שולח והודעה השולח בלבד diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index b9a84b7b..7913c382 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -62,6 +62,11 @@ %d 件のメッセージ + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword ロック画面の通知表示 差出人とメッセージ 差出人のみ diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 3d01d8c4..39e79dda 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -67,6 +67,11 @@ %d žinutės + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Užrakinto ekrano pranešimų matomumas Siuntėjas ir pranešimas Tik siuntėjas diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 76c5d375..6aa0a4f7 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -68,6 +68,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 669639ec..49ff6e62 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index c78c857a..aefd7c6e 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -65,6 +65,11 @@ %d സന്ദേശങ്ങൾ + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword ലോക്ക് സ്ക്രീൻ അറിയിപ്പ് ദൃശ്യപരത അയച്ചയാളും സന്ദേശവും അയയ്ക്കുന്നയാൾ മാത്രം diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 9157790c..aa5e3872 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -65,6 +65,11 @@ %d meldinger + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Synlighet for låseskjermvarsling Avsender og melding Kun avsender @@ -107,4 +112,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 44f2cf5d..6f007467 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -65,6 +65,11 @@ %d berichten + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Meldingen op vergrendelscherm Afzender en bericht Alleen afzender @@ -107,4 +112,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-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 46584fdf..cdad2c36 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -65,6 +65,11 @@ %d سنیہے + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility بھیجݨ والا تے سنیہا صرف بھیجݨ والا diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 8d26cff7..72d22181 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -71,6 +71,11 @@ %d wiadomości + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Widoczność powiadomień na ekranie blokady Nadawca i treść Tylko nadawca @@ -113,4 +118,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 372f162d..1b290083 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -68,6 +68,11 @@ %d mensagens + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Visibilidade de notificação na tela de bloqueio Remetente e mensagem Apenas remetente @@ -110,4 +115,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 dac33dd8..54e9afb0 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -68,6 +68,11 @@ %d mensagens + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Notificação no ecrã de bloqueio Remetente e mensagem Apenas remetente @@ -110,4 +115,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 d32f3591..4fbc1fa0 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -68,6 +68,11 @@ %d mesaje + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Vizibilitatea notificării pe ecranul de blocare Expeditor şi mesaj Doar expeditorul diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3371657d..73a4031e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -71,6 +71,11 @@ %d сообщений + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Отображение уведомлений на экране блокировки Отправитель и сообщение Только отправитель @@ -113,4 +118,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 b2f9477e..4a955f02 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -68,6 +68,11 @@ %d správ + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Viditeľnosť pripomienky na uzavretej obrazovke Odosielateľ a správa Iba odosielateľ diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index bc55f5fc..49ae2459 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -71,6 +71,11 @@ %d sporočil + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Vidnost obvestil na zaklenjenem zaslonu Pošiljatelj in sporočilo Samo pošiljatelj diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 771e9cc0..42e48f80 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -68,6 +68,11 @@ %d порукe + Ријеч + Блокиране ријечи + Управљање блокираним ријечима + Не блокирате ни једну ријеч. Овдје можете додати ријечи како бисте блокирали све поруке које их садрже. + Додај блокирану ријеч. Видљивост обавештења на закључаном екрану Пошиљалац и порука Само пошиљалац diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 5a722d79..29361694 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -65,6 +65,11 @@ %d meddelanden + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Synlighet för aviseringar på låsskärmen Avsändare och meddelande Endast avsändare @@ -107,4 +112,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 1029c6d4..af5b44b2 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -65,6 +65,11 @@ %d செய்திகள் + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword பூட்டுத் திரை அறிவிப்புத் தெரிவுநிலை அனுப்புநர் மற்றும் செய்தி அனுப்புநர் மட்டும் diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 9a1916d2..299197dc 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -62,6 +62,11 @@ %d message + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 650aa34a..ba2a34dc 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -65,6 +65,11 @@ %d ileti + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Kilit ekranı bildirim görünürlüğü Gönderen ve ileti Yalnızca gönderen @@ -107,4 +112,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 734c22a2..0990b3ae 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -71,6 +71,11 @@ %d повідомлень + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Видимість сповіщень на екрані блокування Відправник і повідомлення Лише відправник @@ -113,4 +118,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 6a035913..ce14698a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -62,6 +62,11 @@ %d 个消息 + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword 锁屏通知可见性 发信人和消息 仅发信人 @@ -104,4 +109,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 012d4194..8ffd4358 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -62,6 +62,11 @@ %d 則訊息 + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword 鎖定畫面通知顯示 Sender and message Sender only diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0e2a271f..1a3574e0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -65,6 +65,11 @@ %d messages + Keyword + Blocked keywords + Manage blocked keywords + You are not blocking any keywords. You may add keywords here to block all messages containing them. + Add a blocked keyword Lock screen notification visibility Sender and message Sender only From bdd506c96e384b6d417a5af646738595ae716444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 16:43:07 +0200 Subject: [PATCH 04/45] Add message details menu button Adds a "Properties" menu button in conversation, when one message is selected, which displays details about the message: - Type (SMS or MMS) - Sender phone number (or receiver if it is a sent message) - Used SIM - Date sent at - Date received at (if it is an incoming message) This closes #19 --- .../smsmessenger/activities/ThreadActivity.kt | 1 + .../smsmessenger/adapters/ThreadAdapter.kt | 9 +++ .../databases/MessagesDatabase.kt | 12 +++- .../dialogs/MessageDetailsDialog.kt | 72 +++++++++++++++++++ .../smsmessenger/extensions/Context.kt | 53 +++++++++++++- .../smsmessenger/models/Message.kt | 2 + .../smsmessenger/receivers/SmsReceiver.kt | 22 ++++-- .../res/layout/dialog_message_details.xml | 12 ++++ app/src/main/res/menu/cab_thread.xml | 5 ++ app/src/main/res/values-ar/strings.xml | 9 ++- app/src/main/res/values-az/strings.xml | 7 ++ app/src/main/res/values-be/strings.xml | 7 ++ app/src/main/res/values-bg/strings.xml | 7 ++ app/src/main/res/values-ca/strings.xml | 9 ++- app/src/main/res/values-cr/strings.xml | 7 ++ app/src/main/res/values-cs/strings.xml | 9 ++- app/src/main/res/values-da/strings.xml | 7 ++ app/src/main/res/values-de/strings.xml | 9 ++- app/src/main/res/values-el/strings.xml | 7 ++ app/src/main/res/values-eo/strings.xml | 7 ++ app/src/main/res/values-es/strings.xml | 9 ++- app/src/main/res/values-et/strings.xml | 9 ++- app/src/main/res/values-fi/strings.xml | 9 ++- app/src/main/res/values-fr/strings.xml | 9 ++- app/src/main/res/values-gl/strings.xml | 9 ++- app/src/main/res/values-hi/strings.xml | 7 ++ app/src/main/res/values-hr/strings.xml | 9 ++- app/src/main/res/values-hu/strings.xml | 7 ++ app/src/main/res/values-in/strings.xml | 7 ++ app/src/main/res/values-is/strings.xml | 7 ++ app/src/main/res/values-it/strings.xml | 9 ++- app/src/main/res/values-iw/strings.xml | 7 ++ app/src/main/res/values-ja/strings.xml | 7 ++ app/src/main/res/values-lt/strings.xml | 7 ++ app/src/main/res/values-lv/strings.xml | 7 ++ app/src/main/res/values-mk/strings.xml | 7 ++ app/src/main/res/values-ml/strings.xml | 7 ++ app/src/main/res/values-nb-rNO/strings.xml | 9 ++- app/src/main/res/values-nl/strings.xml | 9 ++- app/src/main/res/values-pa-rPK/strings.xml | 7 ++ app/src/main/res/values-pl/strings.xml | 9 ++- app/src/main/res/values-pt-rBR/strings.xml | 9 ++- app/src/main/res/values-pt/strings.xml | 9 ++- app/src/main/res/values-ro/strings.xml | 7 ++ app/src/main/res/values-ru/strings.xml | 9 ++- app/src/main/res/values-sk/strings.xml | 7 ++ app/src/main/res/values-sl/strings.xml | 7 ++ app/src/main/res/values-sr/strings.xml | 7 ++ app/src/main/res/values-sv/strings.xml | 9 ++- app/src/main/res/values-ta/strings.xml | 7 ++ app/src/main/res/values-th/strings.xml | 7 ++ app/src/main/res/values-tr/strings.xml | 9 ++- app/src/main/res/values-uk/strings.xml | 9 ++- app/src/main/res/values-zh-rCN/strings.xml | 9 ++- app/src/main/res/values-zh-rTW/strings.xml | 7 ++ app/src/main/res/values/strings.xml | 7 ++ 56 files changed, 530 insertions(+), 29 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt create mode 100644 app/src/main/res/layout/dialog_message_details.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt index 62e03a05..0b1727da 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -1602,6 +1602,7 @@ class ThreadActivity : SimpleActivity() { status = STATUS_NONE, participants = participants, date = (scheduledDateTime.millis / 1000).toInt(), + dateSent = (scheduledDateTime.millis / 1000).toInt(), read = false, threadId = threadId, isMMS = isMmsMessage(text), 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 c23cf7b4..b32f42f0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -33,6 +33,7 @@ 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.MessageDetailsDialog import com.simplemobiletools.smsmessenger.dialogs.SelectTextDialog import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.* @@ -82,6 +83,7 @@ class ThreadAdapter( findItem(R.id.cab_share).isVisible = isOneItemSelected && hasText findItem(R.id.cab_forward_message).isVisible = isOneItemSelected findItem(R.id.cab_select_text).isVisible = isOneItemSelected && hasText + findItem(R.id.cab_properties).isVisible = isOneItemSelected } } @@ -98,6 +100,7 @@ class ThreadAdapter( R.id.cab_select_text -> selectText() R.id.cab_delete -> askConfirmDelete() R.id.cab_select_all -> selectAll() + R.id.cab_properties -> showMessageDetails() } } @@ -184,6 +187,12 @@ class ThreadAdapter( } } + private fun showMessageDetails() { + val message = getSelectedItems().firstOrNull() as? Message ?: return + MessageDetailsDialog(activity, message) + } + + private fun askConfirmDelete() { val itemsCnt = selectedKeys.size diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt index fca0754b..8b11a1b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -17,7 +17,7 @@ import com.simplemobiletools.smsmessenger.models.Conversation import com.simplemobiletools.smsmessenger.models.Message import com.simplemobiletools.smsmessenger.models.MessageAttachment -@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 7) +@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 8) @TypeConverters(Converters::class) abstract class MessagesDatabase : RoomDatabase() { @@ -44,6 +44,7 @@ abstract class MessagesDatabase : RoomDatabase() { .addMigrations(MIGRATION_4_5) .addMigrations(MIGRATION_5_6) .addMigrations(MIGRATION_6_7) + .addMigrations(MIGRATION_7_8) .build() } } @@ -115,5 +116,14 @@ abstract class MessagesDatabase : RoomDatabase() { } } } + + private val MIGRATION_7_8 = object : Migration(7, 8) { + override fun migrate(database: SupportSQLiteDatabase) { + database.apply { + execSQL("ALTER TABLE messages ADD COLUMN date_sent INTEGER NOT NULL DEFAULT 0") + execSQL("UPDATE messages SET date_sent = date") + } + } + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt new file mode 100644 index 00000000..0dc79d0e --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -0,0 +1,72 @@ +package com.simplemobiletools.smsmessenger.dialogs + +import android.annotation.SuppressLint +import android.telephony.SubscriptionInfo +import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.extensions.getAlertDialogBuilder +import com.simplemobiletools.commons.extensions.getTimeFormat +import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.extensions.config +import com.simplemobiletools.smsmessenger.extensions.subscriptionManagerCompat +import com.simplemobiletools.smsmessenger.models.Message +import kotlinx.android.synthetic.main.dialog_message_details.view.dialog_message_details_text_value +import org.joda.time.DateTime + +class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Message) { + init { + @SuppressLint("MissingPermission") + val availableSIMs = activity.subscriptionManagerCompat().activeSubscriptionInfoList + + @SuppressLint("SetTextI18n") + val view = activity.layoutInflater.inflate(R.layout.dialog_message_details, null).apply { + dialog_message_details_text_value.text = """ + ${activity.getString(R.string.message_details_type)}: ${message.getMessageType()} + ${message.getReceiverOrSenderLabel()}: ${message.getReceiverOrSenderPhoneNumbers()} + SIM: ${message.getSIM(availableSIMs)} + ${activity.getString(R.string.message_details_sent_at)}: ${message.getSentAt()} + ${message.getReceivedAtLine()} + """.trimIndent().trimEnd() + } + + activity.getAlertDialogBuilder() + .setPositiveButton(R.string.ok) { _, _ -> } + .apply { + activity.setupDialogStuff(view, this, R.string.message_details) + } + } + + private fun Message.getMessageType(): String = if (isMMS) "MMS" else "SMS" + + private fun Message.getReceiverOrSenderLabel(): String { + return if (isReceivedMessage()) { + activity.getString(R.string.message_details_sender) + } else { + activity.getString(R.string.message_details_receiver) + } + } + + private fun Message.getReceiverOrSenderPhoneNumbers(): String { + return participants.joinToString(", ") { it.phoneNumbers.first().value } + } + + private fun Message.getSIM(availableSIMs: List): String { + return availableSIMs.firstOrNull { it.subscriptionId == subscriptionId }?.displayName?.toString() ?: activity.getString(R.string.unknown) + } + + private fun Message.getSentAt(): String { + return DateTime(dateSent * 1000L).toString(activity.config.dateFormat + " " + activity.getTimeFormat()) + } + + private fun Message.getReceivedAtLine(): String { + return if (isReceivedMessage()) { + "${activity.getString(R.string.message_details_received_at)}: ${getReceivedAt()}" + } else { + "" + } + } + + private fun Message.getReceivedAt(): String { + return DateTime(date * 1000L).toString(activity.config.dateFormat + " " + activity.getTimeFormat()) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index c9619701..b239f32e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -70,6 +70,7 @@ fun Context.getMessages( Sms.TYPE, Sms.ADDRESS, Sms.DATE, + Sms.DATE_SENT, Sms.READ, Sms.THREAD_ID, Sms.SUBSCRIPTION_ID, @@ -106,6 +107,7 @@ fun Context.getMessages( val senderName = namePhoto.name val photoUri = namePhoto.photoUri ?: "" val date = (cursor.getLongValue(Sms.DATE) / 1000).toInt() + val dateSent = (cursor.getLongValue(Sms.DATE_SENT) / 1000).toInt() val read = cursor.getIntValue(Sms.READ) == 1 val thread = cursor.getLongValue(Sms.THREAD_ID) val subscriptionId = cursor.getIntValue(Sms.SUBSCRIPTION_ID) @@ -117,7 +119,23 @@ fun Context.getMessages( } val isMMS = false val message = - Message(id, body, type, status, ArrayList(participants), date, read, thread, isMMS, null, senderNumber, senderName, photoUri, subscriptionId) + Message( + id, + body, + type, + status, + ArrayList(participants), + date, + dateSent, + read, + thread, + isMMS, + null, + senderNumber, + senderName, + photoUri, + subscriptionId + ) messages.add(message) } @@ -148,6 +166,7 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, val projection = arrayOf( Mms._ID, Mms.DATE, + Mms.DATE_SENT, Mms.READ, Mms.MESSAGE_BOX, Mms.THREAD_ID, @@ -175,6 +194,7 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, val mmsId = cursor.getLongValue(Mms._ID) val type = cursor.getIntValue(Mms.MESSAGE_BOX) val date = cursor.getLongValue(Mms.DATE).toInt() + val dateSent = cursor.getLongValue(Mms.DATE_SENT).toInt() val read = cursor.getIntValue(Mms.READ) == 1 val threadId = cursor.getLongValue(Mms.THREAD_ID) val subscriptionId = cursor.getIntValue(Mms.SUBSCRIPTION_ID) @@ -202,7 +222,23 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, } val message = - Message(mmsId, body, type, status, participants, date, read, threadId, isMMS, attachment, senderNumber, senderName, senderPhotoUri, subscriptionId) + Message( + mmsId, + body, + type, + status, + participants, + date, + dateSent, + read, + threadId, + isMMS, + attachment, + senderNumber, + senderName, + senderPhotoUri, + subscriptionId + ) messages.add(message) participants.forEach { @@ -560,13 +596,24 @@ fun Context.getNameAndPhotoFromPhoneNumber(number: String): NamePhoto { return NamePhoto(number, null) } -fun Context.insertNewSMS(address: String, subject: String, body: String, date: Long, read: Int, threadId: Long, type: Int, subscriptionId: Int): Long { +fun Context.insertNewSMS( + address: String, + subject: String, + body: String, + date: Long, + dateSent: Long, + read: Int, + threadId: Long, + type: Int, + subscriptionId: Int +): Long { val uri = Sms.CONTENT_URI val contentValues = ContentValues().apply { put(Sms.ADDRESS, address) put(Sms.SUBJECT, subject) put(Sms.BODY, body) put(Sms.DATE, date) + put(Sms.DATE_SENT, dateSent) put(Sms.READ, read) put(Sms.THREAD_ID, threadId) put(Sms.TYPE, type) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt index d4f6de58..584332ca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt @@ -14,6 +14,7 @@ data class Message( @ColumnInfo(name = "status") val status: Int, @ColumnInfo(name = "participants") val participants: ArrayList, @ColumnInfo(name = "date") val date: Int, + @ColumnInfo(name = "date_sent") val dateSent: Int, @ColumnInfo(name = "read") val read: Boolean, @ColumnInfo(name = "thread_id") val threadId: Long, @ColumnInfo(name = "is_mms") val isMMS: Boolean, @@ -58,6 +59,7 @@ data class Message( return old.body == new.body && old.threadId == new.threadId && old.date == new.date && + old.dateSent == new.dateSent && old.isMMS == new.isMMS && old.attachment == new.attachment && old.senderPhoneNumber == new.senderPhoneNumber && diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt index d947190e..5f54d6fa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -24,6 +24,7 @@ class SmsReceiver : BroadcastReceiver() { var body = "" var subject = "" var date = 0L + var dateSent = 0L var threadId = 0L var status = Telephony.Sms.STATUS_NONE val type = Telephony.Sms.MESSAGE_TYPE_INBOX @@ -38,6 +39,7 @@ class SmsReceiver : BroadcastReceiver() { status = it.status body += it.messageBody date = System.currentTimeMillis() + dateSent = it.timestampMillis threadId = context.getThreadId(address) } @@ -45,17 +47,27 @@ class SmsReceiver : BroadcastReceiver() { val simpleContactsHelper = SimpleContactsHelper(context) simpleContactsHelper.exists(address, privateCursor) { exists -> if (exists) { - handleMessage(context, address, subject, body, date, read, threadId, type, subscriptionId, status) + handleMessage(context, address, subject, body, date, dateSent, read, threadId, type, subscriptionId, status) } } } else { - handleMessage(context, address, subject, body, date, read, threadId, type, subscriptionId, status) + handleMessage(context, address, subject, body, date, dateSent, read, threadId, type, subscriptionId, status) } } } private fun handleMessage( - context: Context, address: String, subject: String, body: String, date: Long, read: Int, threadId: Long, type: Int, subscriptionId: Int, status: Int + context: Context, + address: String, + subject: String, + body: String, + date: Long, + dateSent: Long, + read: Int, + threadId: Long, + type: Int, + subscriptionId: Int, + status: Int ) { val photoUri = SimpleContactsHelper(context).getPhotoUriFromPhoneNumber(address) val bitmap = context.getNotificationBitmap(photoUri) @@ -63,7 +75,7 @@ class SmsReceiver : BroadcastReceiver() { if (!context.isNumberBlocked(address)) { val privateCursor = context.getMyContactsCursor(favoritesOnly = false, withPhoneNumbersOnly = true) ensureBackgroundThread { - val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId) + val newMessageId = context.insertNewSMS(address, subject, body, date, dateSent, read, threadId, type, subscriptionId) val conversation = context.getConversations(threadId).firstOrNull() ?: return@ensureBackgroundThread try { @@ -81,6 +93,7 @@ class SmsReceiver : BroadcastReceiver() { val participant = SimpleContact(0, 0, senderName, photoUri, arrayListOf(phoneNumber), ArrayList(), ArrayList()) val participants = arrayListOf(participant) val messageDate = (date / 1000).toInt() + val messageSentDate = (dateSent / 1000).toInt() val message = Message( @@ -90,6 +103,7 @@ class SmsReceiver : BroadcastReceiver() { status, participants, messageDate, + messageSentDate, false, threadId, false, diff --git a/app/src/main/res/layout/dialog_message_details.xml b/app/src/main/res/layout/dialog_message_details.xml new file mode 100644 index 00000000..13b68aaf --- /dev/null +++ b/app/src/main/res/layout/dialog_message_details.xml @@ -0,0 +1,12 @@ + + diff --git a/app/src/main/res/menu/cab_thread.xml b/app/src/main/res/menu/cab_thread.xml index 2d4351e9..a1150743 100644 --- a/app/src/main/res/menu/cab_thread.xml +++ b/app/src/main/res/menu/cab_thread.xml @@ -26,6 +26,11 @@ android:icon="@drawable/ic_save_vector" android:title="@string/save_as" app:showAsAction="ifRoom" /> + استمر في تشغيل الهاتف وتأكد من عدم وجود شيء يقتل التطبيق أثناء وجوده في الخلفية. Update message ارسل الان + + Message details + Sender + Receiver + Type + Sent at + Received at تم تلقي الرسائل القصيرة رسالة جديدة @@ -119,4 +126,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 669639ec..6a39a91f 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 80dabae2..bff31275 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -48,6 +48,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Атрымана паведамленне Новае паведамленне diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 50d6c913..f90780d6 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Получено съобщение Ново съобщение diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 18e938e5..390b5504 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -46,6 +46,13 @@ Mantingueu el telèfon engegat i assegureu-vos que no hi hagi res que mati les aplicacions en segon pla. Update message Envia ara + + Message details + Sender + Receiver + Type + Sent at + Received at SMS rebut Missatge nou @@ -107,4 +114,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-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 669639ec..6a39a91f 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 56ee7077..df477ff5 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -47,6 +47,13 @@ Ponechte telefon zapnutý a ujistěte se, že nic nezabije aplikaci běžící na pozadí. Update message Odeslat nyní + + Message details + Sender + Receiver + Type + Sent at + Received at Přijaté SMS Nová zpráva @@ -110,4 +117,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 a7b1a837..d6a95322 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Modtag SMS Ny Besked diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index dd571c63..4a9ab843 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -46,6 +46,13 @@ Lassen Sie das Telefon eingeschaltet und vergewissern Sie sich, dass die Anwendung im Hintergrund nicht abgeschaltet wird. Nachricht aktualisieren Jetzt senden + + Message details + Sender + Receiver + Type + Sent at + Received at Empfangene SMS Neue Nachricht @@ -107,4 +114,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 5e613921..0af6e1f1 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -46,6 +46,13 @@ Κρατήστε το τηλέφωνο ανοιχτό και βεβαιωθείτε ότι δεν υπάρχει τίποτα που να κλείνει την εφαρμογή ενώ βρίσκεται στο παρασκήνιο. Ενημέρωση μηνύματος Αποστολή τώρα + + Message details + Sender + Receiver + Type + Sent at + Received at Ελήφθη SMS Νέο μήνυμα diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 1f3ce244..55a86b4c 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS Nova mesaĝo diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f4b25568..db69cdf0 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -47,6 +47,13 @@ Mantenga el teléfono encendido y asegúrese de que no hay nada que mate la aplicación en segundo plano. Actualizar mensaje Enviar ahora + + Message details + Sender + Receiver + Type + Sent at + Received at Mensaje recibido Nuevo mensaje @@ -110,4 +117,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 d23562ae..c15c8140 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -46,6 +46,13 @@ Vaata, et telefon oleks sisse lülitatud ja mitte miski ei katkestaks selle rakenduse tööd taustal. Update message Saada kohe + + Message details + Sender + Receiver + Type + Sent at + Received at Vastuvõetud SMS Uus sõnum @@ -107,4 +114,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 5912ef49..f7d847f6 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -46,6 +46,13 @@ Pidä puhelin päällä ja varmista, ettei sovellusta lopeteta taustalla. Päivitä viesti Lähetä nyt + + Message details + Sender + Receiver + Type + Sent at + Received at Vastaanotettu tekstiviesti Uusi viesti @@ -107,4 +114,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 361ffcd5..4e9f680e 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -47,6 +47,13 @@ Gardez le téléphone allumé et assurez-vous que l\'application ne soit pas fermée en arrière-plan. Mettre à jour le message Envoyer maintenant + + Message details + Sender + Receiver + Type + Sent at + Received at SMS reçu Nouveau message @@ -110,4 +117,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 135b326d..57937ddb 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -46,6 +46,13 @@ Mantén o teléfono acendido e asegúrate de que non hai nada que mate a aplicación en segundo plano. Update message Enviar agora + + Message details + Sender + Receiver + Type + Sent at + Received at SMS recibida Nova mensaxe @@ -107,4 +114,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-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 669639ec..6a39a91f 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 4adf51bd..672139ff 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -47,6 +47,13 @@ Ostavi telefon uključen i provjeri da ništa ne prekida rad aplikacije kada je u pozadini. Ažuriraj poruku Pošalji sada + + Pojedinosti poruke + Šalje + Prima + Vrsta + Poslano + Primljeno Primljene SMS poruke Nova poruka @@ -110,4 +117,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 5d03b980..5efae0ce 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -46,6 +46,13 @@ Tartsa bekapcsolva a telefont, és győződjön meg róla, hogy semmi sem lövi ki az alkalmazást a háttérben. Üzenet frissítése Küldés most + + Message details + Sender + Receiver + Type + Sent at + Received at SMS fogadva Új üzenet diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index dd1e2656..6462cc70 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -45,6 +45,13 @@ Tetap nyalakan ponsel dan pastikan tidak ada apa pun yang menutup aplikasi selagi di latar belakang. Update message Kirim sekarang + + Message details + Sender + Receiver + Type + Sent at + Received at Menerima SMS Pesan baru diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 5b0d3463..231b77fb 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f7e8ea3a..bc2b479c 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -47,6 +47,13 @@ Tieni il telefono acceso e assicurati che non ci sia nulla che chiuda l\'app in background. Update message Invia ora + + Message details + Sender + Receiver + Type + Sent at + Received at SMS ricevuto Nuovo messaggio @@ -110,4 +117,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 895a9030..e5876a6e 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -48,6 +48,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at קבלת סמס הודעה חדשה diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index b9a84b7b..b3f34f9e 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -45,6 +45,13 @@ 端末の電源を入れたままにしつつ、アプリがバックグラウンドで強制終了されないようにしてください(バッテリー節約設定からこのアプリを除外してください)。 メッセージを更新 今すぐ送信 + + Message details + Sender + Receiver + Type + Sent at + Received at 受信した SMS 新しいメッセージ diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 3d01d8c4..be983be0 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -47,6 +47,13 @@ Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Gautos žinutės Nauja žinutė diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 76c5d375..da1f4966 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -47,6 +47,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 669639ec..6a39a91f 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index c78c857a..a1acc4e3 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -46,6 +46,13 @@ ഫോൺ ഓണാക്കി ബാക്ക്ഗ്രൗണ്ടിൽ ആയിരിക്കുമ്പോൾ ആപ്പിനെ നശിപ്പിക്കുന്ന ഒന്നും ഇല്ലെന്ന് ഉറപ്പാക്കുക. Update message ഇപ്പോൾ അയയ്ക്കുക + + Message details + Sender + Receiver + Type + Sent at + Received at SMS ലഭിച്ചു പുതിയ മെസ്സേജ് diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 9157790c..18d31e07 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -46,6 +46,13 @@ Ha telefonen påslått og forsikre deg at appen ikke blir terminert mens den er i bakgrunnen. Oppdater melding Send nå + + Message details + Sender + Receiver + Type + Sent at + Received at Mottatt SMS Ny melding @@ -107,4 +114,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 44f2cf5d..77ac4898 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -46,6 +46,13 @@ Zorg ervoor dat het toestel blijft ingeschakeld en dat de app niet op de achtergrond wordt afgesloten. Bericht aanpassen Nu versturen + + Message details + Sender + Receiver + Type + Sent at + Received at Ontvangen berichten Nieuw bericht @@ -107,4 +114,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-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 46584fdf..2d8c1725 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. سنیہا بدلو ہݨے بھیجو + + Message details + Sender + Receiver + Type + Sent at + Received at سنیہا لیا گیا نواں سنیہا diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 8d26cff7..c0971e70 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -48,6 +48,13 @@ Pozostaw telefon włączony i upewnij się, że nic nie wyłącza aplikacji w tle. Zaktualizuj wiadomość Wyślij teraz + + Message details + Sender + Receiver + Type + Sent at + Received at Otrzymany SMS Nowa wiadomość @@ -113,4 +120,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 372f162d..a2f493cd 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -47,6 +47,13 @@ Mantenha o telefone ligado e certifique-se de que não haja nada matando o aplicativo enquanto estiver em segundo plano. Update message Enviar agora + + Message details + Sender + Receiver + Type + Sent at + Received at SMS recebido Nova mensagem @@ -110,4 +117,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 dac33dd8..62ca4266 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -47,6 +47,13 @@ Mantenha o telefone ligado e verifique se não há nada que esteja a bloquear a aplicação em segundo plano. Atualizar mensagem Enviar agora + + Message details + Sender + Receiver + Type + Sent at + Received at SMS recebida Nova mensagem @@ -110,4 +117,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 d32f3591..29f129cd 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -47,6 +47,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at SMS-uri primite Mesaj nou diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3371657d..cfe56234 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -48,6 +48,13 @@ Держите устройство включённым и убедитесь, что ничто не завершает принудительно приложение в фоновом режиме. Обновить сообщение Отправить сейчас + + Message details + Sender + Receiver + Type + Sent at + Received at Получено сообщение Новое сообщение @@ -113,4 +120,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 b2f9477e..ec1c1161 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -47,6 +47,13 @@ Majte zapnuté zariadenie a uistite sa, že apku na pozadí nič nevypne. Upraviť správu Odoslať teraz + + Message details + Sender + Receiver + Type + Sent at + Received at Prijatá SMS Nová správa diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index bc55f5fc..5d11dffa 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -48,6 +48,13 @@ Telefon vklopite in poskrbite, da bo aplikacija v ozadju delovala. Update message Sedaj pošlji + + Message details + Sender + Receiver + Type + Sent at + Received at Prejeto SMS sporočilo Novo sporočilo diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 771e9cc0..402ac22d 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -47,6 +47,13 @@ Држите телефон укључен и уверите се да ништа не убија апликацију док је у позадини. Ажурирајте поруку Пошаљи одмах + + Детаљи о поруци + Шалје + Прима + Врста + Послано + Примлјено Примите СМС Нова порука diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 5a722d79..910ac5cc 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -46,6 +46,13 @@ Ha telefonen påslagen och kontrollera att inget avslutar appen i bakgrunden. Uppdatera meddelande Skicka nu + + Message details + Sender + Receiver + Type + Sent at + Received at Tog emot sms Nytt meddelande @@ -107,4 +114,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 1029c6d4..17a74830 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at SMS கிடைத்தது புதிய செய்தி diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 9a1916d2..559f47d4 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -45,6 +45,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 650aa34a..8ff2d4d8 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -46,6 +46,13 @@ Telefonu açık tutun ve arka planda uygulamayı sonlandıran hiçbir şey olmadığından emin olun. İletiyi güncelle Şimdi gönder + + Message details + Sender + Receiver + Type + Sent at + Received at SMS alındı Yeni ileti @@ -107,4 +114,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 734c22a2..c72f1110 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -48,6 +48,13 @@ Тримайте телефон увімкненим і переконайтеся, що ніщо не завершує застосунок у фоновому режимі. Update message Надіслати зараз + + Message details + Sender + Receiver + Type + Sent at + Received at Отримано повідомлення Нове повідомлення @@ -113,4 +120,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 6a035913..ede0515b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -45,6 +45,13 @@ 保持手机开机,并确保应用后台不被终止. 更新消息 立即发送 + + Message details + Sender + Receiver + Type + Sent at + Received at 接收到的短信 新消息 @@ -104,4 +111,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 012d4194..34dcbdb2 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -45,6 +45,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at 收到的簡訊 新訊息 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0e2a271f..c49264b5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -46,6 +46,13 @@ Keep the phone on and make sure there is nothing killing the app while in background. Update message Send now + + Message details + Sender + Receiver + Type + Sent at + Received at Received SMS New message From e4269c83560ba71bafa0ad1fd2da8ee968d2f127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 16:47:50 +0200 Subject: [PATCH 05/45] Remove needless extra empty line in ThreadAdapter --- .../com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt | 1 - 1 file changed, 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 b32f42f0..82da0e28 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -192,7 +192,6 @@ class ThreadAdapter( MessageDetailsDialog(activity, message) } - private fun askConfirmDelete() { val itemsCnt = selectedKeys.size From 28a19a09cedfc95b3d8c2c49d55c931fe06536c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 16:50:17 +0200 Subject: [PATCH 06/45] Use string format instead of concatenation in MessageDetailsDialog --- .../smsmessenger/dialogs/MessageDetailsDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index 0dc79d0e..04f4d7e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -67,6 +67,6 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag } private fun Message.getReceivedAt(): String { - return DateTime(date * 1000L).toString(activity.config.dateFormat + " " + activity.getTimeFormat()) + return DateTime(date * 1000L).toString("${activity.config.dateFormat} ${activity.getTimeFormat()}") } } From 45416c07bd35a1170e4f51b49c00bcb9e2bfaa51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 16:51:37 +0200 Subject: [PATCH 07/45] Split getReceiverOrSenderPhoneNumbers in MessageDetailsDialog in multiple lines --- .../smsmessenger/dialogs/MessageDetailsDialog.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index 04f4d7e8..e57d2903 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -47,7 +47,9 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag } private fun Message.getReceiverOrSenderPhoneNumbers(): String { - return participants.joinToString(", ") { it.phoneNumbers.first().value } + return participants.joinToString(", ") { + it.phoneNumbers.first().value + } } private fun Message.getSIM(availableSIMs: List): String { From c1b29646d39ac65a43a29a304980d86b523a19a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 16:59:36 +0200 Subject: [PATCH 08/45] Show SIM in details only if multiple are present --- .../dialogs/MessageDetailsDialog.kt | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index e57d2903..83061563 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -20,13 +20,17 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag @SuppressLint("SetTextI18n") val view = activity.layoutInflater.inflate(R.layout.dialog_message_details, null).apply { - dialog_message_details_text_value.text = """ - ${activity.getString(R.string.message_details_type)}: ${message.getMessageType()} - ${message.getReceiverOrSenderLabel()}: ${message.getReceiverOrSenderPhoneNumbers()} - SIM: ${message.getSIM(availableSIMs)} - ${activity.getString(R.string.message_details_sent_at)}: ${message.getSentAt()} - ${message.getReceivedAtLine()} - """.trimIndent().trimEnd() + dialog_message_details_text_value.text = mutableListOf().apply { + add("${activity.getString(R.string.message_details_type)}: ${message.getMessageType()}") + add("${message.getReceiverOrSenderLabel()}: ${message.getReceiverOrSenderPhoneNumbers()}") + if (availableSIMs.count() > 1) { + add("SIM: ${message.getSIM(availableSIMs)}") + } + add("${activity.getString(R.string.message_details_sent_at)}: ${message.getSentAt()}") + if (message.isReceivedMessage()) { + add("${activity.getString(R.string.message_details_received_at)}: ${message.getReceivedAt()}") + } + }.joinToString(separator = System.lineSeparator()) } activity.getAlertDialogBuilder() @@ -60,14 +64,6 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag return DateTime(dateSent * 1000L).toString(activity.config.dateFormat + " " + activity.getTimeFormat()) } - private fun Message.getReceivedAtLine(): String { - return if (isReceivedMessage()) { - "${activity.getString(R.string.message_details_received_at)}: ${getReceivedAt()}" - } else { - "" - } - } - private fun Message.getReceivedAt(): String { return DateTime(date * 1000L).toString("${activity.config.dateFormat} ${activity.getTimeFormat()}") } From daea2d2e5df497b6d10c42c6c32e3e1fc2ac49be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 10 Jul 2023 17:00:32 +0200 Subject: [PATCH 09/45] Remove unused address and subject from message filter in SmsReceiver --- .../simplemobiletools/smsmessenger/receivers/SmsReceiver.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt index 61450edd..5e9bc40e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -57,7 +57,7 @@ class SmsReceiver : BroadcastReceiver() { private fun handleMessage( context: Context, address: String, subject: String, body: String, date: Long, read: Int, threadId: Long, type: Int, subscriptionId: Int, status: Int ) { - if (isMessageFilteredOut(context, address, subject, body)) { + if (isMessageFilteredOut(context, body)) { return } @@ -111,7 +111,7 @@ class SmsReceiver : BroadcastReceiver() { } } - private fun isMessageFilteredOut(context: Context, address: String, subject: String, body: String): Boolean { + private fun isMessageFilteredOut(context: Context, body: String): Boolean { for (blockedKeyword in context.config.blockedKeywords) { if (body.contains(blockedKeyword, ignoreCase = true)) { return true From b49643562be45e9c9a00db59750633d1b3f0fcd7 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Mon, 10 Jul 2023 20:19:33 +0200 Subject: [PATCH 10/45] updating the slovak translation --- app/src/main/res/values-sk/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 4a955f02..33c4beb5 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -68,11 +68,11 @@ %d správ - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Kľúčové slovo + Blokované kľúčové slová + Spravovať blokované kľúčové slová + Nie sú blokované žiadne kľúčové slová. Môžete nejaké pridať, tým zablokujete všetky správy, ktoré tieto slova budú obsahovať. + Pridať blokované kľúčové slovo Viditeľnosť pripomienky na uzavretej obrazovke Odosielateľ a správa Iba odosielateľ From a5d6e7724c7d0cfdfd0bb160e3b0ce8c6db35401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 09:49:40 +0200 Subject: [PATCH 11/45] Reduce displayed data in message details dialog --- .../smsmessenger/activities/ThreadActivity.kt | 1 - .../smsmessenger/databases/MessagesDatabase.kt | 12 +----------- .../dialogs/MessageDetailsDialog.kt | 18 ++++++++---------- .../smsmessenger/extensions/Context.kt | 8 -------- .../smsmessenger/models/Message.kt | 2 -- .../smsmessenger/receivers/SmsReceiver.kt | 11 +++-------- app/src/main/res/values-ar/strings.xml | 1 - app/src/main/res/values-az/strings.xml | 1 - app/src/main/res/values-be/strings.xml | 1 - app/src/main/res/values-bg/strings.xml | 1 - app/src/main/res/values-ca/strings.xml | 1 - app/src/main/res/values-cr/strings.xml | 1 - app/src/main/res/values-cs/strings.xml | 1 - app/src/main/res/values-da/strings.xml | 1 - app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-el/strings.xml | 1 - app/src/main/res/values-eo/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-et/strings.xml | 1 - app/src/main/res/values-fi/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-gl/strings.xml | 1 - app/src/main/res/values-hi/strings.xml | 1 - app/src/main/res/values-hr/strings.xml | 1 - app/src/main/res/values-hu/strings.xml | 1 - app/src/main/res/values-in/strings.xml | 1 - app/src/main/res/values-is/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-iw/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-lt/strings.xml | 1 - app/src/main/res/values-lv/strings.xml | 1 - app/src/main/res/values-mk/strings.xml | 1 - app/src/main/res/values-ml/strings.xml | 1 - app/src/main/res/values-nb-rNO/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pa-rPK/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-pt/strings.xml | 1 - app/src/main/res/values-ro/strings.xml | 1 - app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values-sk/strings.xml | 1 - app/src/main/res/values-sl/strings.xml | 1 - app/src/main/res/values-sr/strings.xml | 1 - app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values-ta/strings.xml | 1 - app/src/main/res/values-th/strings.xml | 1 - app/src/main/res/values-tr/strings.xml | 1 - app/src/main/res/values-uk/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values-zh-rTW/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - 53 files changed, 12 insertions(+), 87 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt index 0b1727da..62e03a05 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -1602,7 +1602,6 @@ class ThreadActivity : SimpleActivity() { status = STATUS_NONE, participants = participants, date = (scheduledDateTime.millis / 1000).toInt(), - dateSent = (scheduledDateTime.millis / 1000).toInt(), read = false, threadId = threadId, isMMS = isMmsMessage(text), diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt index 8b11a1b9..fca0754b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -17,7 +17,7 @@ import com.simplemobiletools.smsmessenger.models.Conversation import com.simplemobiletools.smsmessenger.models.Message import com.simplemobiletools.smsmessenger.models.MessageAttachment -@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 8) +@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 7) @TypeConverters(Converters::class) abstract class MessagesDatabase : RoomDatabase() { @@ -44,7 +44,6 @@ abstract class MessagesDatabase : RoomDatabase() { .addMigrations(MIGRATION_4_5) .addMigrations(MIGRATION_5_6) .addMigrations(MIGRATION_6_7) - .addMigrations(MIGRATION_7_8) .build() } } @@ -116,14 +115,5 @@ abstract class MessagesDatabase : RoomDatabase() { } } } - - private val MIGRATION_7_8 = object : Migration(7, 8) { - override fun migrate(database: SupportSQLiteDatabase) { - database.apply { - execSQL("ALTER TABLE messages ADD COLUMN date_sent INTEGER NOT NULL DEFAULT 0") - execSQL("UPDATE messages SET date_sent = date") - } - } - } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index 83061563..d1f89b22 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -21,15 +21,11 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag @SuppressLint("SetTextI18n") val view = activity.layoutInflater.inflate(R.layout.dialog_message_details, null).apply { dialog_message_details_text_value.text = mutableListOf().apply { - add("${activity.getString(R.string.message_details_type)}: ${message.getMessageType()}") add("${message.getReceiverOrSenderLabel()}: ${message.getReceiverOrSenderPhoneNumbers()}") if (availableSIMs.count() > 1) { add("SIM: ${message.getSIM(availableSIMs)}") } - add("${activity.getString(R.string.message_details_sent_at)}: ${message.getSentAt()}") - if (message.isReceivedMessage()) { - add("${activity.getString(R.string.message_details_received_at)}: ${message.getReceivedAt()}") - } + add("${message.getSentOrReceivedAtLabel()}: ${message.getSentOrReceivedAt()}") }.joinToString(separator = System.lineSeparator()) } @@ -40,8 +36,6 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag } } - private fun Message.getMessageType(): String = if (isMMS) "MMS" else "SMS" - private fun Message.getReceiverOrSenderLabel(): String { return if (isReceivedMessage()) { activity.getString(R.string.message_details_sender) @@ -60,11 +54,15 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag return availableSIMs.firstOrNull { it.subscriptionId == subscriptionId }?.displayName?.toString() ?: activity.getString(R.string.unknown) } - private fun Message.getSentAt(): String { - return DateTime(dateSent * 1000L).toString(activity.config.dateFormat + " " + activity.getTimeFormat()) + private fun Message.getSentOrReceivedAtLabel(): String { + return if (isReceivedMessage()) { + activity.getString(R.string.message_details_received_at) + } else { + activity.getString(R.string.message_details_sent_at) + } } - private fun Message.getReceivedAt(): String { + private fun Message.getSentOrReceivedAt(): String { return DateTime(date * 1000L).toString("${activity.config.dateFormat} ${activity.getTimeFormat()}") } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index b239f32e..d07b3c8d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -70,7 +70,6 @@ fun Context.getMessages( Sms.TYPE, Sms.ADDRESS, Sms.DATE, - Sms.DATE_SENT, Sms.READ, Sms.THREAD_ID, Sms.SUBSCRIPTION_ID, @@ -107,7 +106,6 @@ fun Context.getMessages( val senderName = namePhoto.name val photoUri = namePhoto.photoUri ?: "" val date = (cursor.getLongValue(Sms.DATE) / 1000).toInt() - val dateSent = (cursor.getLongValue(Sms.DATE_SENT) / 1000).toInt() val read = cursor.getIntValue(Sms.READ) == 1 val thread = cursor.getLongValue(Sms.THREAD_ID) val subscriptionId = cursor.getIntValue(Sms.SUBSCRIPTION_ID) @@ -126,7 +124,6 @@ fun Context.getMessages( status, ArrayList(participants), date, - dateSent, read, thread, isMMS, @@ -166,7 +163,6 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, val projection = arrayOf( Mms._ID, Mms.DATE, - Mms.DATE_SENT, Mms.READ, Mms.MESSAGE_BOX, Mms.THREAD_ID, @@ -194,7 +190,6 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, val mmsId = cursor.getLongValue(Mms._ID) val type = cursor.getIntValue(Mms.MESSAGE_BOX) val date = cursor.getLongValue(Mms.DATE).toInt() - val dateSent = cursor.getLongValue(Mms.DATE_SENT).toInt() val read = cursor.getIntValue(Mms.READ) == 1 val threadId = cursor.getLongValue(Mms.THREAD_ID) val subscriptionId = cursor.getIntValue(Mms.SUBSCRIPTION_ID) @@ -229,7 +224,6 @@ fun Context.getMMS(threadId: Long? = null, getImageResolutions: Boolean = false, status, participants, date, - dateSent, read, threadId, isMMS, @@ -601,7 +595,6 @@ fun Context.insertNewSMS( subject: String, body: String, date: Long, - dateSent: Long, read: Int, threadId: Long, type: Int, @@ -613,7 +606,6 @@ fun Context.insertNewSMS( put(Sms.SUBJECT, subject) put(Sms.BODY, body) put(Sms.DATE, date) - put(Sms.DATE_SENT, dateSent) put(Sms.READ, read) put(Sms.THREAD_ID, threadId) put(Sms.TYPE, type) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt index 584332ca..d4f6de58 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Message.kt @@ -14,7 +14,6 @@ data class Message( @ColumnInfo(name = "status") val status: Int, @ColumnInfo(name = "participants") val participants: ArrayList, @ColumnInfo(name = "date") val date: Int, - @ColumnInfo(name = "date_sent") val dateSent: Int, @ColumnInfo(name = "read") val read: Boolean, @ColumnInfo(name = "thread_id") val threadId: Long, @ColumnInfo(name = "is_mms") val isMMS: Boolean, @@ -59,7 +58,6 @@ data class Message( return old.body == new.body && old.threadId == new.threadId && old.date == new.date && - old.dateSent == new.dateSent && old.isMMS == new.isMMS && old.attachment == new.attachment && old.senderPhoneNumber == new.senderPhoneNumber && diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt index 5f54d6fa..9ab475ca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -24,7 +24,6 @@ class SmsReceiver : BroadcastReceiver() { var body = "" var subject = "" var date = 0L - var dateSent = 0L var threadId = 0L var status = Telephony.Sms.STATUS_NONE val type = Telephony.Sms.MESSAGE_TYPE_INBOX @@ -39,7 +38,6 @@ class SmsReceiver : BroadcastReceiver() { status = it.status body += it.messageBody date = System.currentTimeMillis() - dateSent = it.timestampMillis threadId = context.getThreadId(address) } @@ -47,11 +45,11 @@ class SmsReceiver : BroadcastReceiver() { val simpleContactsHelper = SimpleContactsHelper(context) simpleContactsHelper.exists(address, privateCursor) { exists -> if (exists) { - handleMessage(context, address, subject, body, date, dateSent, read, threadId, type, subscriptionId, status) + handleMessage(context, address, subject, body, date, read, threadId, type, subscriptionId, status) } } } else { - handleMessage(context, address, subject, body, date, dateSent, read, threadId, type, subscriptionId, status) + handleMessage(context, address, subject, body, date, read, threadId, type, subscriptionId, status) } } } @@ -62,7 +60,6 @@ class SmsReceiver : BroadcastReceiver() { subject: String, body: String, date: Long, - dateSent: Long, read: Int, threadId: Long, type: Int, @@ -75,7 +72,7 @@ class SmsReceiver : BroadcastReceiver() { if (!context.isNumberBlocked(address)) { val privateCursor = context.getMyContactsCursor(favoritesOnly = false, withPhoneNumbersOnly = true) ensureBackgroundThread { - val newMessageId = context.insertNewSMS(address, subject, body, date, dateSent, read, threadId, type, subscriptionId) + val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId) val conversation = context.getConversations(threadId).firstOrNull() ?: return@ensureBackgroundThread try { @@ -93,7 +90,6 @@ class SmsReceiver : BroadcastReceiver() { val participant = SimpleContact(0, 0, senderName, photoUri, arrayListOf(phoneNumber), ArrayList(), ArrayList()) val participants = arrayListOf(participant) val messageDate = (date / 1000).toInt() - val messageSentDate = (dateSent / 1000).toInt() val message = Message( @@ -103,7 +99,6 @@ class SmsReceiver : BroadcastReceiver() { status, participants, messageDate, - messageSentDate, false, threadId, false, diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 9e869a3b..ec532b4b 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -54,7 +54,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 6a39a91f..49adce08 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index bff31275..df957202 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index f90780d6..186658d8 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 390b5504..fa3453d3 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 6a39a91f..49adce08 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index df477ff5..323b7256 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d6a95322..d07c7fb7 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 4a9ab843..110f4b4a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 0af6e1f1..cd365215 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 55a86b4c..e834d5c6 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index db69cdf0..572158d1 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index c15c8140..605de343 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index f7d847f6..62f60ee3 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 4e9f680e..2e77d761 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 57937ddb..94f2ca6b 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 6a39a91f..49adce08 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 672139ff..97cd17f2 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -51,7 +51,6 @@ Pojedinosti poruke Šalje Prima - Vrsta Poslano Primljeno diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 5efae0ce..e4d4fdae 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 6462cc70..ee358d3e 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -49,7 +49,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 231b77fb..b23617b3 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index bc2b479c..e048b1b2 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index e5876a6e..ca97c1a0 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index b3f34f9e..53eeddd6 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -49,7 +49,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index be983be0..590b9298 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index da1f4966..5055d526 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 6a39a91f..49adce08 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index a1acc4e3..9ce35dba 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 18d31e07..76ebfb3a 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 77ac4898..2401a5bf 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 2d8c1725..d2aad96e 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index c0971e70..ee076db6 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index a2f493cd..d22f1e0c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 62ca4266..f266ac5b 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 29f129cd..75cba463 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index cfe56234..b82de622 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index ec1c1161..a78c741f 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -51,7 +51,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 5d11dffa..afb8a286 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 402ac22d..c9e568fd 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -51,7 +51,6 @@ Детаљи о поруци Шалје Прима - Врста Послано Примлјено diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 910ac5cc..89d8734d 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 17a74830..77a55a49 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 559f47d4..02767b36 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -49,7 +49,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 8ff2d4d8..1a39d5be 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index c72f1110..168dbb24 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -52,7 +52,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ede0515b..c9607507 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -49,7 +49,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 34dcbdb2..5a57d49a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -49,7 +49,6 @@ Message details Sender Receiver - Type Sent at Received at diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c49264b5..9db46dc0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -50,7 +50,6 @@ Message details Sender Receiver - Type Sent at Received at From 6fef121599ceebc38082ea1a19cd065ffd6914e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 09:55:57 +0200 Subject: [PATCH 12/45] Fix formatting of senders and receivers --- .../smsmessenger/dialogs/MessageDetailsDialog.kt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index d1f89b22..57390420 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -45,8 +45,20 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag } private fun Message.getReceiverOrSenderPhoneNumbers(): String { - return participants.joinToString(", ") { - it.phoneNumbers.first().value + return if (isReceivedMessage()) { + formatContactInfo(senderName, senderPhoneNumber) + } else { + participants.joinToString(", ") { + formatContactInfo(it.name, it.phoneNumbers.first().value) + } + } + } + + private fun formatContactInfo(name: String, phoneNumber: String): String { + return if (name != phoneNumber) { + "$name ($phoneNumber)" + } else { + phoneNumber } } From 3adfdd401ef43d1e8d262d8860397f589764d941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 11:02:55 +0200 Subject: [PATCH 13/45] Update dialog to reuse properties dialog from file manager --- app/build.gradle | 2 +- .../dialogs/MessageDetailsDialog.kt | 37 ++++++++----------- app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-az/strings.xml | 1 + app/src/main/res/values-be/strings.xml | 1 + app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values-ca/strings.xml | 1 + app/src/main/res/values-cr/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-el/strings.xml | 1 + app/src/main/res/values-eo/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-et/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-gl/strings.xml | 1 + app/src/main/res/values-hi/strings.xml | 1 + app/src/main/res/values-hr/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-in/strings.xml | 1 + app/src/main/res/values-is/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-lt/strings.xml | 1 + app/src/main/res/values-lv/strings.xml | 1 + app/src/main/res/values-mk/strings.xml | 1 + app/src/main/res/values-ml/strings.xml | 1 + app/src/main/res/values-nb-rNO/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-pa-rPK/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values-ro/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-sk/strings.xml | 1 + app/src/main/res/values-sl/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 1 + app/src/main/res/values-ta/strings.xml | 1 + app/src/main/res/values-th/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 49 files changed, 63 insertions(+), 23 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7f9727a4..e9ab4c84 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:4c83ec8740' + implementation 'com.github.esensar:Simple-Commons:7b890eae3e' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:33fcaf94d9' diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt index 57390420..3088cbd8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/MessageDetailsDialog.kt @@ -3,48 +3,41 @@ package com.simplemobiletools.smsmessenger.dialogs import android.annotation.SuppressLint import android.telephony.SubscriptionInfo import com.simplemobiletools.commons.activities.BaseSimpleActivity -import com.simplemobiletools.commons.extensions.getAlertDialogBuilder -import com.simplemobiletools.commons.extensions.getTimeFormat -import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.commons.dialogs.BasePropertiesDialog +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.extensions.config import com.simplemobiletools.smsmessenger.extensions.subscriptionManagerCompat import com.simplemobiletools.smsmessenger.models.Message -import kotlinx.android.synthetic.main.dialog_message_details.view.dialog_message_details_text_value import org.joda.time.DateTime -class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Message) { +class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Message) : BasePropertiesDialog(activity) { init { @SuppressLint("MissingPermission") val availableSIMs = activity.subscriptionManagerCompat().activeSubscriptionInfoList - @SuppressLint("SetTextI18n") - val view = activity.layoutInflater.inflate(R.layout.dialog_message_details, null).apply { - dialog_message_details_text_value.text = mutableListOf().apply { - add("${message.getReceiverOrSenderLabel()}: ${message.getReceiverOrSenderPhoneNumbers()}") - if (availableSIMs.count() > 1) { - add("SIM: ${message.getSIM(availableSIMs)}") - } - add("${message.getSentOrReceivedAtLabel()}: ${message.getSentOrReceivedAt()}") - }.joinToString(separator = System.lineSeparator()) + addProperty(message.getSenderOrReceiverLabel(), message.getSenderOrReceiverPhoneNumbers()) + if (availableSIMs.count() > 1) { + addProperty(R.string.message_details_sim, message.getSIM(availableSIMs)) } + addProperty(message.getSentOrReceivedAtLabel(), message.getSentOrReceivedAt()) activity.getAlertDialogBuilder() .setPositiveButton(R.string.ok) { _, _ -> } .apply { - activity.setupDialogStuff(view, this, R.string.message_details) + activity.setupDialogStuff(mDialogView, this, R.string.message_details) } } - private fun Message.getReceiverOrSenderLabel(): String { + private fun Message.getSenderOrReceiverLabel(): Int { return if (isReceivedMessage()) { - activity.getString(R.string.message_details_sender) + R.string.message_details_sender } else { - activity.getString(R.string.message_details_receiver) + R.string.message_details_receiver } } - private fun Message.getReceiverOrSenderPhoneNumbers(): String { + private fun Message.getSenderOrReceiverPhoneNumbers(): String { return if (isReceivedMessage()) { formatContactInfo(senderName, senderPhoneNumber) } else { @@ -66,11 +59,11 @@ class MessageDetailsDialog(val activity: BaseSimpleActivity, val message: Messag return availableSIMs.firstOrNull { it.subscriptionId == subscriptionId }?.displayName?.toString() ?: activity.getString(R.string.unknown) } - private fun Message.getSentOrReceivedAtLabel(): String { + private fun Message.getSentOrReceivedAtLabel(): Int { return if (isReceivedMessage()) { - activity.getString(R.string.message_details_received_at) + R.string.message_details_received_at } else { - activity.getString(R.string.message_details_sent_at) + R.string.message_details_sent_at } } diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index ec532b4b..f41f07ed 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -54,6 +54,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 49adce08..f85b1c83 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index df957202..f7ec54fa 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 186658d8..e610a7ab 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index fa3453d3..f1e8ee60 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 49adce08..f85b1c83 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 323b7256..62fc082b 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d07c7fb7..fd2d135d 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 110f4b4a..1ecd3c29 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index cd365215..8582ed3f 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index e834d5c6..b92943bc 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 572158d1..bb4e5bfe 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 605de343..166d13d2 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 62f60ee3..87658d78 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 2e77d761..f593e98c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 94f2ca6b..ab23262e 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 49adce08..f85b1c83 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 97cd17f2..3325f0eb 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -51,6 +51,7 @@ Pojedinosti poruke Šalje Prima + SIM Poslano Primljeno diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index e4d4fdae..a0fe3054 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index ee358d3e..1afa473c 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -49,6 +49,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index b23617b3..afb85413 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index e048b1b2..975a9ead 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index ca97c1a0..9c6559fe 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 53eeddd6..c17bb33c 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -49,6 +49,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 590b9298..0a5bbc1a 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 5055d526..48572e7c 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 49adce08..f85b1c83 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 9ce35dba..c7282d53 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 76ebfb3a..9eedb354 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 2401a5bf..12dbcf2a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index d2aad96e..7417d66c 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index ee076db6..4c585d49 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index d22f1e0c..ed2c24fe 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index f266ac5b..f7378cbe 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 75cba463..43a6aad3 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index b82de622..b0d9e140 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index a78c741f..78389705 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -51,6 +51,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index afb8a286..669fb21c 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index c9e568fd..839b4699 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -51,6 +51,7 @@ Детаљи о поруци Шалје Прима + SIM Послано Примлјено diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 89d8734d..b06f30dc 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 77a55a49..4239325a 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 02767b36..2cee29ab 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -49,6 +49,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 1a39d5be..eac8bee7 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 168dbb24..9e1bac7a 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -52,6 +52,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index c9607507..ae3ac04d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -49,6 +49,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5a57d49a..c730eb89 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -49,6 +49,7 @@ Message details Sender Receiver + SIM Sent at Received at diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9db46dc0..dae0f917 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -50,6 +50,7 @@ Message details Sender Receiver + SIM Sent at Received at From d27a2f5747f470a96ec3dff42055777d34242669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 13:44:50 +0200 Subject: [PATCH 14/45] Update Simple-Commons ref --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index e9ab4c84..31aab16d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.esensar:Simple-Commons:7b890eae3e' + implementation 'com.github.SimpleMobileTools:Simple-Commons:b4cc381943' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:33fcaf94d9' From 98eb62e1b6664f4dfcc554ff4ae89efc6df58957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 13:45:15 +0200 Subject: [PATCH 15/45] Move message_details_sim to donottranslate --- app/src/main/res/values-ar/strings.xml | 3 +-- app/src/main/res/values-az/strings.xml | 3 +-- app/src/main/res/values-be/strings.xml | 3 +-- app/src/main/res/values-bg/strings.xml | 3 +-- app/src/main/res/values-ca/strings.xml | 3 +-- app/src/main/res/values-cr/strings.xml | 3 +-- app/src/main/res/values-cs/strings.xml | 3 +-- app/src/main/res/values-da/strings.xml | 3 +-- app/src/main/res/values-de/strings.xml | 3 +-- app/src/main/res/values-el/strings.xml | 3 +-- app/src/main/res/values-eo/strings.xml | 3 +-- app/src/main/res/values-es/strings.xml | 3 +-- app/src/main/res/values-et/strings.xml | 3 +-- app/src/main/res/values-fi/strings.xml | 3 +-- app/src/main/res/values-fr/strings.xml | 3 +-- app/src/main/res/values-gl/strings.xml | 3 +-- app/src/main/res/values-hi/strings.xml | 3 +-- app/src/main/res/values-hr/strings.xml | 3 +-- app/src/main/res/values-hu/strings.xml | 3 +-- app/src/main/res/values-in/strings.xml | 3 +-- app/src/main/res/values-is/strings.xml | 3 +-- app/src/main/res/values-it/strings.xml | 3 +-- app/src/main/res/values-iw/strings.xml | 3 +-- app/src/main/res/values-ja/strings.xml | 3 +-- app/src/main/res/values-lt/strings.xml | 3 +-- app/src/main/res/values-lv/strings.xml | 3 +-- app/src/main/res/values-mk/strings.xml | 3 +-- app/src/main/res/values-ml/strings.xml | 3 +-- app/src/main/res/values-nb-rNO/strings.xml | 3 +-- app/src/main/res/values-nl/strings.xml | 3 +-- app/src/main/res/values-pa-rPK/strings.xml | 3 +-- app/src/main/res/values-pl/strings.xml | 3 +-- app/src/main/res/values-pt-rBR/strings.xml | 3 +-- app/src/main/res/values-pt/strings.xml | 3 +-- app/src/main/res/values-ro/strings.xml | 3 +-- app/src/main/res/values-ru/strings.xml | 3 +-- app/src/main/res/values-sk/strings.xml | 3 +-- app/src/main/res/values-sl/strings.xml | 3 +-- app/src/main/res/values-sr/strings.xml | 3 +-- app/src/main/res/values-sv/strings.xml | 3 +-- app/src/main/res/values-ta/strings.xml | 3 +-- app/src/main/res/values-th/strings.xml | 3 +-- app/src/main/res/values-tr/strings.xml | 3 +-- app/src/main/res/values-uk/strings.xml | 3 +-- app/src/main/res/values-zh-rCN/strings.xml | 3 +-- app/src/main/res/values-zh-rTW/strings.xml | 3 +-- app/src/main/res/values/donottranslate.xml | 1 + app/src/main/res/values/strings.xml | 3 +-- 48 files changed, 48 insertions(+), 94 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index f41f07ed..aaef4a40 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -54,8 +54,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at تم تلقي الرسائل القصيرة diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index f85b1c83..f7d02f74 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index f7ec54fa..02e09d3d 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Атрымана паведамленне diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index e610a7ab..03d0798b 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Получено съобщение diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index f1e8ee60..1e47575d 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS rebut diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index f85b1c83..f7d02f74 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 62fc082b..5da210ef 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Přijaté SMS diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index fd2d135d..7a23ffa8 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Modtag SMS diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 1ecd3c29..fd3d335e 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Empfangene SMS diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 8582ed3f..727a703c 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Ελήφθη SMS diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index b92943bc..12590a6a 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bb4e5bfe..71d04aee 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Mensaje recibido diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 166d13d2..3657a21e 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Vastuvõetud SMS diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 87658d78..57b05806 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Vastaanotettu tekstiviesti diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f593e98c..113131e4 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS reçu diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index ab23262e..a33465b5 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS recibida diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index f85b1c83..f7d02f74 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 3325f0eb..77624a0b 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -51,8 +51,7 @@ Pojedinosti poruke Šalje Prima - SIM - Poslano + Poslano Primljeno Primljene SMS poruke diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index a0fe3054..36305bd9 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS fogadva diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 1afa473c..17e25e85 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -49,8 +49,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Menerima SMS diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index afb85413..2c361df3 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 975a9ead..f06535ef 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS ricevuto diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 9c6559fe..204a42a5 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at קבלת סמס diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index c17bb33c..f4422fc8 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -49,8 +49,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at 受信した SMS diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 0a5bbc1a..8b6a5d2a 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Gautos žinutės diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 48572e7c..c491a00f 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index f85b1c83..f7d02f74 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index c7282d53..9a359612 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS ലഭിച്ചു diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 9eedb354..67d8cc88 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Mottatt SMS diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 12dbcf2a..d492617c 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Ontvangen berichten diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 7417d66c..bea419fa 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at سنیہا لیا گیا diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 4c585d49..d17a63f1 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Otrzymany SMS diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index ed2c24fe..0739139a 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS recebido diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index f7378cbe..ebebe5ab 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS recebida diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 43a6aad3..cead22e7 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS-uri primite diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index b0d9e140..147c5a46 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Получено сообщение diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 78389705..1b9bf517 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -51,8 +51,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Prijatá SMS diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 669fb21c..1cab17d6 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Prejeto SMS sporočilo diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 839b4699..39ed4f46 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -51,8 +51,7 @@ Детаљи о поруци Шалје Прима - SIM - Послано + Послано Примлјено Примите СМС diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index b06f30dc..48bf49bd 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Tog emot sms diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 4239325a..b41153b1 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS கிடைத்தது diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 2cee29ab..1cf281ea 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -49,8 +49,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index eac8bee7..087c23e0 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at SMS alındı diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 9e1bac7a..e32ef4ec 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -52,8 +52,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Отримано повідомлення diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ae3ac04d..59ac6c8e 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -49,8 +49,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at 接收到的短信 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c730eb89..d0f6af6e 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -49,8 +49,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at 收到的簡訊 diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index cfc80cca..687d1e68 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -10,6 +10,7 @@ 2MB SMS MMS + SIM Allow scheduling messages by long pressing the Send button diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dae0f917..3247b761 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -50,8 +50,7 @@ Message details Sender Receiver - SIM - Sent at + Sent at Received at Received SMS From cf7003e3b4c3c608a29f6a480cc7ebeabe4c7ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 15:11:53 +0200 Subject: [PATCH 16/45] Remove extra spaces in strings files --- 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-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-is/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-pa-rPK/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-sr/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 +- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index aaef4a40..ec532b4b 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -54,7 +54,7 @@ Message details Sender Receiver - Sent at + Sent at Received at تم تلقي الرسائل القصيرة diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index f7d02f74..49adce08 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 02e09d3d..df957202 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Атрымана паведамленне diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 03d0798b..186658d8 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Получено съобщение diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 1e47575d..fa3453d3 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS rebut diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index f7d02f74..49adce08 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 5da210ef..323b7256 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Přijaté SMS diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 7a23ffa8..d07c7fb7 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Modtag SMS diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index fd3d335e..110f4b4a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Empfangene SMS diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 727a703c..cd365215 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Ελήφθη SMS diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 12590a6a..e834d5c6 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 71d04aee..572158d1 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Mensaje recibido diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 3657a21e..605de343 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Vastuvõetud SMS diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 57b05806..62f60ee3 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Vastaanotettu tekstiviesti diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 113131e4..2e77d761 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS reçu diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index a33465b5..94f2ca6b 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS recibida diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index f7d02f74..49adce08 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 77624a0b..97cd17f2 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -51,7 +51,7 @@ Pojedinosti poruke Šalje Prima - Poslano + Poslano Primljeno Primljene SMS poruke diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 36305bd9..e4d4fdae 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS fogadva diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 17e25e85..ee358d3e 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -49,7 +49,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Menerima SMS diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 2c361df3..b23617b3 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f06535ef..e048b1b2 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS ricevuto diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 204a42a5..ca97c1a0 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at קבלת סמס diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index f4422fc8..53eeddd6 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -49,7 +49,7 @@ Message details Sender Receiver - Sent at + Sent at Received at 受信した SMS diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 8b6a5d2a..590b9298 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Gautos žinutės diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index c491a00f..5055d526 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index f7d02f74..49adce08 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 9a359612..9ce35dba 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS ലഭിച്ചു diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 67d8cc88..76ebfb3a 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Mottatt SMS diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index d492617c..2401a5bf 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Ontvangen berichten diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index bea419fa..d2aad96e 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at سنیہا لیا گیا diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index d17a63f1..ee076db6 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Otrzymany SMS diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0739139a..d22f1e0c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS recebido diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index ebebe5ab..f266ac5b 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS recebida diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index cead22e7..75cba463 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS-uri primite diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 147c5a46..b82de622 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Получено сообщение diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 1b9bf517..a78c741f 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -51,7 +51,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Prijatá SMS diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 1cab17d6..afb8a286 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Prejeto SMS sporočilo diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 39ed4f46..c9e568fd 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -51,7 +51,7 @@ Детаљи о поруци Шалје Прима - Послано + Послано Примлјено Примите СМС diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 48bf49bd..89d8734d 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Tog emot sms diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index b41153b1..77a55a49 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS கிடைத்தது diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 1cf281ea..02767b36 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -49,7 +49,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 087c23e0..1a39d5be 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at SMS alındı diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e32ef4ec..168dbb24 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -52,7 +52,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Отримано повідомлення diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 59ac6c8e..c9607507 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -49,7 +49,7 @@ Message details Sender Receiver - Sent at + Sent at Received at 接收到的短信 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index d0f6af6e..5a57d49a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -49,7 +49,7 @@ Message details Sender Receiver - Sent at + Sent at Received at 收到的簡訊 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3247b761..9db46dc0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -50,7 +50,7 @@ Message details Sender Receiver - Sent at + Sent at Received at Received SMS From aecaff6d6a5949a8b8f6f2bef9e5da90fd0bba87 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Tue, 11 Jul 2023 15:24:32 +0200 Subject: [PATCH 17/45] updating the slovak translation --- app/src/main/res/values-sk/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index a78c741f..cf7ffbd9 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -48,11 +48,11 @@ Upraviť správu Odoslať teraz - Message details - Sender - Receiver - Sent at - Received at + Detaily správy + Odosielateľ + Prijímateľ + Odoslané + Prijaté Prijatá SMS Nová správa From e825e44f548c618a789b13f10ec238f46a687560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 12:13:59 +0200 Subject: [PATCH 18/45] Add support for importing XML exports This covers importing from Signal and Silence applications export This closes #519 --- .../smsmessenger/activities/MainActivity.kt | 26 ++- .../smsmessenger/helpers/Constants.kt | 1 + .../smsmessenger/helpers/MessagesImporter.kt | 185 +++++++++++++----- 3 files changed, 155 insertions(+), 57 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index 1204d748..4298014e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -627,6 +627,7 @@ class MainActivity : SimpleActivity() { Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) type = EXPORT_MIME_TYPE + putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(EXPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) try { startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) @@ -639,27 +640,27 @@ class MainActivity : SimpleActivity() { } else { handlePermission(PERMISSION_READ_STORAGE) { if (it) { - importEvents() + importMessages() } } } } - private fun importEvents() { + private fun importMessages() { FilePickerDialog(this) { - showImportEventsDialog(it) + showImportMessagesDialog(it) } } - private fun showImportEventsDialog(path: String) { + private fun showImportMessagesDialog(path: String) { ImportMessagesDialog(this, path) } private fun tryImportMessagesFromFile(uri: Uri) { when (uri.scheme) { - "file" -> showImportEventsDialog(uri.path!!) + "file" -> showImportMessagesDialog(uri.path!!) "content" -> { - val tempFile = getTempFile("messages", "backup.json") + var tempFile = getTempFile("messages", "backup.json") if (tempFile == null) { toast(R.string.unknown_error_occurred) return @@ -669,7 +670,18 @@ class MainActivity : SimpleActivity() { val inputStream = contentResolver.openInputStream(uri) val out = FileOutputStream(tempFile) inputStream!!.copyTo(out) - showImportEventsDialog(tempFile.absolutePath) + // Check is XML and properly rename + tempFile.bufferedReader().use { + if (it.readLine().startsWith(" - val jsonReader = gson.newJsonReader(reader) - val smsMessageType = object : TypeToken() {}.type - val mmsMessageType = object : TypeToken() {}.type - - jsonReader.beginArray() - while (jsonReader.hasNext()) { - jsonReader.beginObject() - while (jsonReader.hasNext()) { - val nextToken = jsonReader.peek() - if (nextToken.ordinal == JsonToken.NAME.ordinal) { - val msgType = jsonReader.nextName() - - if ((!msgType.equals("sms") && !msgType.equals("mms")) || - (msgType.equals("sms") && !config.importSms) || - (msgType.equals("mms") && !config.importMms) - ) { - jsonReader.skipValue() - continue - } - - jsonReader.beginArray() - while (jsonReader.hasNext()) { - try { - if (msgType.equals("sms")) { - val message = gson.fromJson(jsonReader, smsMessageType) - messageWriter.writeSmsMessage(message) - } else { - val message = gson.fromJson(jsonReader, mmsMessageType) - messageWriter.writeMmsMessage(message) - } - - messagesImported++ - } catch (e: Exception) { - context.showErrorToast(e) - messagesFailed++ - - } - } - jsonReader.endArray() - } else { - jsonReader.skipValue() - } - } - - jsonReader.endObject() - refreshMessages() - } - - jsonReader.endArray() + if (path.endsWith("xml")) { + inputStream.importXml() + } else { + inputStream.importJson() } + } catch (e: Exception) { context.showErrorToast(e) messagesFailed++ @@ -101,4 +59,131 @@ class MessagesImporter(private val context: Context) { ) } } + + private fun InputStream.importJson() { + bufferedReader().use { reader -> + val jsonReader = gson.newJsonReader(reader) + val smsMessageType = object : TypeToken() {}.type + val mmsMessageType = object : TypeToken() {}.type + + jsonReader.beginArray() + while (jsonReader.hasNext()) { + jsonReader.beginObject() + while (jsonReader.hasNext()) { + val nextToken = jsonReader.peek() + if (nextToken.ordinal == JsonToken.NAME.ordinal) { + val msgType = jsonReader.nextName() + + if ((!msgType.equals("sms") && !msgType.equals("mms")) || + (msgType.equals("sms") && !config.importSms) || + (msgType.equals("mms") && !config.importMms) + ) { + jsonReader.skipValue() + continue + } + + jsonReader.beginArray() + while (jsonReader.hasNext()) { + try { + if (msgType.equals("sms")) { + val message = gson.fromJson(jsonReader, smsMessageType) + messageWriter.writeSmsMessage(message) + } else { + val message = gson.fromJson(jsonReader, mmsMessageType) + messageWriter.writeMmsMessage(message) + } + + messagesImported++ + } catch (e: Exception) { + context.showErrorToast(e) + messagesFailed++ + + } + } + jsonReader.endArray() + } else { + jsonReader.skipValue() + } + } + + jsonReader.endObject() + refreshMessages() + } + + jsonReader.endArray() + } + } + + private fun InputStream.importXml() { + bufferedReader().use { reader -> + val xmlParser = Xml.newPullParser().apply { + setInput(reader) + } + + xmlParser.nextTag() + xmlParser.require(XmlPullParser.START_TAG, null, "smses") + + var depth = 1 + while (depth != 0) { + when (xmlParser.next()) { + XmlPullParser.END_TAG -> depth-- + XmlPullParser.START_TAG -> depth++ + } + + if (xmlParser.eventType != XmlPullParser.START_TAG) { + continue + } + + try { + if (xmlParser.name == "sms") { + if (config.importSms) { + val message = xmlParser.readSms() + messageWriter.writeSmsMessage(message) + messagesImported++ + } else { + xmlParser.skip() + } + } else { + xmlParser.skip() + } + } catch (e: Exception) { + context.showErrorToast(e) + messagesFailed++ + } + } + + refreshMessages() + } + } + + private fun XmlPullParser.readSms(): SmsBackup { + require(XmlPullParser.START_TAG, null, "sms") + + return SmsBackup( + subscriptionId = 0, + address = getAttributeValue(null, "address"), + body = getAttributeValue(null, "body"), + date = getAttributeValue(null, "date").toLong(), + dateSent = getAttributeValue(null, "date").toLong(), + locked = getAttributeValue(null, "locked").toInt(), + protocol = getAttributeValue(null, "protocol"), + read = getAttributeValue(null, "read").toInt(), + status = getAttributeValue(null, "status").toInt(), + type = getAttributeValue(null, "type").toInt(), + serviceCenter = getAttributeValue(null, "service_center") + ) + } + + private fun XmlPullParser.skip() { + if (eventType != XmlPullParser.START_TAG) { + throw IllegalStateException() + } + var depth = 1 + while (depth != 0) { + when (next()) { + XmlPullParser.END_TAG -> depth-- + XmlPullParser.START_TAG -> depth++ + } + } + } } From 0e2dd357d1164d4261b71eea277e8f873c4739f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 12:15:30 +0200 Subject: [PATCH 19/45] Fix export for LOCKED property for SMS --- .../simplemobiletools/smsmessenger/helpers/MessagesReader.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt index 175ad735..bc26837c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt @@ -40,7 +40,7 @@ class MessagesReader(private val context: Context) { val body = cursor.getStringValueOrNull(Sms.BODY) val date = cursor.getLongValue(Sms.DATE) val dateSent = cursor.getLongValue(Sms.DATE_SENT) - val locked = cursor.getIntValue(Sms.DATE_SENT) + val locked = cursor.getIntValue(Sms.LOCKED) val protocol = cursor.getStringValueOrNull(Sms.PROTOCOL) val read = cursor.getIntValue(Sms.READ) val status = cursor.getIntValue(Sms.STATUS) @@ -172,6 +172,7 @@ class MessagesReader(private val context: Context) { stream.readBytes().toString(Charsets.UTF_8) } } + else -> { usePart(partId) { stream -> Base64.encodeToString(stream.readBytes(), Base64.DEFAULT) From d97a6f6a5f96ced833462b21185edf7ae7476117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 17:45:24 +0200 Subject: [PATCH 20/45] Ensure that MMS reception ACK is sent to prevent duplicate MMS This implements the getMmscInfoForReceptionAck method in MmsReceiver which is according to android-smsmms library required for some carriers, since otherwise MMS would be duplicated. Unfortunately, accessing MMSC information is more restricted with each version of Android and this implementation relies on system database on older versions and uses APN database included with android-smsmms for newer versions, which will work only on the default SIM card. --- .../com/simplemobiletools/smsmessenger/App.kt | 6 ++ .../smsmessenger/receivers/MmsReceiver.kt | 67 ++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt index 5f76354e..c5f624f6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt @@ -1,11 +1,17 @@ package com.simplemobiletools.smsmessenger import android.app.Application +import com.klinker.android.send_message.ApnUtils import com.simplemobiletools.commons.extensions.checkUseEnglish +import com.simplemobiletools.commons.helpers.isRPlus class App : Application() { override fun onCreate() { super.onCreate() checkUseEnglish() + + if (isRPlus()) { + ApnUtils.initDefaultApns(this) {} + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt index 57f35872..13911e4c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt @@ -1,19 +1,84 @@ package com.simplemobiletools.smsmessenger.receivers +import android.content.BroadcastReceiver import android.content.Context +import android.content.Intent import android.net.Uri import android.os.Handler import android.os.Looper +import android.preference.PreferenceManager +import android.provider.Telephony import com.bumptech.glide.Glide +import com.klinker.android.send_message.MmsReceivedReceiver +import com.klinker.android.send_message.MmsReceivedReceiver.MmscInformation +import com.klinker.android.send_message.MmsReceivedReceiver.SUBSCRIPTION_ID +import com.klinker.android.send_message.Utils +import com.simplemobiletools.commons.extensions.getStringValue import com.simplemobiletools.commons.extensions.isNumberBlocked import com.simplemobiletools.commons.extensions.normalizePhoneNumber +import com.simplemobiletools.commons.extensions.queryCursor import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.helpers.isQPlus +import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.refreshMessages // more info at https://github.com/klinker41/android-smsmms -class MmsReceiver : com.klinker.android.send_message.MmsReceivedReceiver() { +class MmsReceiver : BroadcastReceiver() { + + private var carriers = mutableMapOf() + + override fun onReceive(context: Context?, intent: Intent?) { + if (isRPlus() && carriers.isNotEmpty()) { + // This information is stored by ApnUtils from android-smsmms + PreferenceManager.getDefaultSharedPreferences(context).apply { + carriers[0] = MmscInformation( + getString("mmsc_url", ""), + getString("mms_proxy", ""), + getString("mms_port", "0")?.toInt() ?: 0 + ) + } + } else { + val subscriptionId = intent?.getIntExtra(SUBSCRIPTION_ID, Utils.getDefaultSubscriptionId()) ?: Utils.getDefaultSubscriptionId() + if (carriers.containsKey(subscriptionId).not()) { + val baseUri = if (isQPlus()) { + Telephony.Carriers.SIM_APN_URI + } else { + Telephony.Carriers.CONTENT_URI + } + val uri = Uri.withAppendedPath(baseUri, subscriptionId.toString()) + val projection = arrayOf( + Telephony.Carriers.MMSC, + Telephony.Carriers.MMSPROXY, + Telephony.Carriers.MMSPORT, + ) + val selection = "${Telephony.Carriers.TYPE} LIKE ?" + val selectionArgs = arrayOf("%mms%") + + context?.queryCursor(uri, projection = projection, selection = selection, selectionArgs = selectionArgs) { cursor -> + carriers[subscriptionId] = MmscInformation( + cursor.getStringValue(Telephony.Carriers.MMSC), + cursor.getStringValue(Telephony.Carriers.MMSPROXY), + cursor.getStringValue(Telephony.Carriers.MMSPORT).toIntOrNull() ?: 0, + ) + } + } + } + val mmscInformation = if (isRPlus()) { + carriers[0] + } else { + val subscriptionId = intent?.getIntExtra(SUBSCRIPTION_ID, Utils.getDefaultSubscriptionId()) ?: Utils.getDefaultSubscriptionId() + carriers[subscriptionId] + } + MmsReceivedReceiverImplementation(mmscInformation).onReceive(context, intent) + } +} + +private class MmsReceivedReceiverImplementation(private val mmscInformation: MmscInformation?) : MmsReceivedReceiver() { + override fun getMmscInfoForReceptionAck(): MmscInformation? { + return mmscInformation + } override fun isAddressBlocked(context: Context, address: String): Boolean { val normalizedAddress = address.normalizePhoneNumber() From ab898bfcbe7135f5b3e378a5c4ca66179ec53d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 18:05:15 +0200 Subject: [PATCH 21/45] Update android-smsmms for cleaner MmsReceiver --- app/build.gradle | 2 +- .../smsmessenger/receivers/MmsReceiver.kt | 26 +++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 31aab16d..a1171569 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'com.github.SimpleMobileTools:Simple-Commons:b4cc381943' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' - implementation 'com.github.tibbi:android-smsmms:33fcaf94d9' + implementation 'com.github.esensar:android-smsmms:f6551b0b4f' implementation "me.leolin:ShortcutBadger:1.1.22" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt index 13911e4c..b5097cc7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt @@ -1,8 +1,6 @@ package com.simplemobiletools.smsmessenger.receivers -import android.content.BroadcastReceiver import android.content.Context -import android.content.Intent import android.net.Uri import android.os.Handler import android.os.Looper @@ -10,9 +8,6 @@ import android.preference.PreferenceManager import android.provider.Telephony import com.bumptech.glide.Glide import com.klinker.android.send_message.MmsReceivedReceiver -import com.klinker.android.send_message.MmsReceivedReceiver.MmscInformation -import com.klinker.android.send_message.MmsReceivedReceiver.SUBSCRIPTION_ID -import com.klinker.android.send_message.Utils import com.simplemobiletools.commons.extensions.getStringValue import com.simplemobiletools.commons.extensions.isNumberBlocked import com.simplemobiletools.commons.extensions.normalizePhoneNumber @@ -25,11 +20,11 @@ import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.refreshMessages // more info at https://github.com/klinker41/android-smsmms -class MmsReceiver : BroadcastReceiver() { +class MmsReceiver : MmsReceivedReceiver() { private var carriers = mutableMapOf() - override fun onReceive(context: Context?, intent: Intent?) { + private fun populateMmscInformation(context: Context, subscriptionId: Int) { if (isRPlus() && carriers.isNotEmpty()) { // This information is stored by ApnUtils from android-smsmms PreferenceManager.getDefaultSharedPreferences(context).apply { @@ -40,7 +35,6 @@ class MmsReceiver : BroadcastReceiver() { ) } } else { - val subscriptionId = intent?.getIntExtra(SUBSCRIPTION_ID, Utils.getDefaultSubscriptionId()) ?: Utils.getDefaultSubscriptionId() if (carriers.containsKey(subscriptionId).not()) { val baseUri = if (isQPlus()) { Telephony.Carriers.SIM_APN_URI @@ -56,7 +50,7 @@ class MmsReceiver : BroadcastReceiver() { val selection = "${Telephony.Carriers.TYPE} LIKE ?" val selectionArgs = arrayOf("%mms%") - context?.queryCursor(uri, projection = projection, selection = selection, selectionArgs = selectionArgs) { cursor -> + context.queryCursor(uri, projection = projection, selection = selection, selectionArgs = selectionArgs) { cursor -> carriers[subscriptionId] = MmscInformation( cursor.getStringValue(Telephony.Carriers.MMSC), cursor.getStringValue(Telephony.Carriers.MMSPROXY), @@ -65,19 +59,19 @@ class MmsReceiver : BroadcastReceiver() { } } } - val mmscInformation = if (isRPlus()) { + } + + private fun getMmscInformation(subscriptionId: Int): MmscInformation? { + return if (isRPlus()) { carriers[0] } else { - val subscriptionId = intent?.getIntExtra(SUBSCRIPTION_ID, Utils.getDefaultSubscriptionId()) ?: Utils.getDefaultSubscriptionId() carriers[subscriptionId] } - MmsReceivedReceiverImplementation(mmscInformation).onReceive(context, intent) } -} -private class MmsReceivedReceiverImplementation(private val mmscInformation: MmscInformation?) : MmsReceivedReceiver() { - override fun getMmscInfoForReceptionAck(): MmscInformation? { - return mmscInformation + override fun getMmscInfoForReceptionAck(context: Context, subscriptionId: Int): MmscInformation? { + populateMmscInformation(context, subscriptionId) + return getMmscInformation(subscriptionId) } override fun isAddressBlocked(context: Context, address: String): Boolean { From d15384db260b326e2c9f443a5b52cfa526d9490a Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 11 Jul 2023 17:07:01 +0000 Subject: [PATCH 22/45] Translated using Weblate (Dutch) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/nl/ --- app/src/main/res/values-nl/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index fef437c6..a7e00389 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -71,11 +71,11 @@ %d berichten - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Trefwoord + Geblokkeerde woorden + Geblokkeerde woorden beheren + Er worden geen woorden geblokkeerd. Voeg hier trefwoorden toe om alle berichten die deze woorden bevatten te blokkeren. + Geblokkeerd woord toevoegen Meldingen op vergrendelscherm Afzender en bericht Alleen afzender @@ -102,7 +102,7 @@ Kon het bericht niet verzenden: geen bereik Kon het bericht niet verzenden: vliegtuigmodus Kon het bericht niet verzenden: netwerkfout - Kon het bericht niet verzenden: foutcode %1$d + Kon het bericht niet verzenden: foutcode %d Er kan niet gereageerd worden op korte codes zoals deze Er kan alleen worden gereageerd op korte codes met cijfers, zoals \"503501\", maar niet op codes met letters en cijfers, zoals \"AB-CD0\". De bestandsgrootte van de bijlage overschrijdt de limiet voor MMS @@ -112,10 +112,10 @@ Dit is helaas nodig voor het verzenden van MMS-bijlagen. Het versturen van MMS-berichten onmogelijk maken zou een te groot nadeel t.o.v. andere apps betekenen en daarom hebben we besloten om het toch toe te voegen. Zoals gewoonlijk bevat de app echter geen advertenties, tracking of analytics; de verbinding wordt alleen maar gebruikt voor het versturen van MMS-berichten. Mijn MMS-berichten worden niet ontvangen, is er iets wat ik daaraan kan doen\? Providers limiteren de grootte van MMS-berichten. Probeer in de instellingen de limiet voor de afbeeldingsgrootte te verlagen. - Does the app support scheduled messages? - Yes, you can schedule messages to be sent in the future by long pressing the Send button and picking the desired date and time. + Ondersteunt deze app het inplannen van berichten\? + Ja, berichten kunnen vertraagd verzonden worden door lang te drukken op de verzendknop en vervolgens een tijdstip voor verzending op te geven. - + \ No newline at end of file From 52fecff926e9fa31811a0cdbe4dfcd83b2df4ce8 Mon Sep 17 00:00:00 2001 From: Agnieszka C Date: Mon, 10 Jul 2023 18:57:00 +0000 Subject: [PATCH 23/45] Translated using Weblate (Polish) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/pl/ --- app/src/main/res/values-pl/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index eb07f2e6..9162b7ae 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -77,11 +77,11 @@ %d wiadomości - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Słowo kluczowe + Zablokowane słowa kluczowe + Zarządzaj zablokowanymi słowami kluczowymi + Nie blokujesz żadnych słów kluczowych. Możesz dodać tutaj słowa kluczowe, aby blokować wszystkie wiadomości je zawierające. + Dodaj słowo kluczowe do blokowania Widoczność powiadomień na ekranie blokady Nadawca i treść Tylko nadawca @@ -124,4 +124,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 From 0c4774cd569b148fb183a66c5a8aab5601126717 Mon Sep 17 00:00:00 2001 From: solokot Date: Tue, 11 Jul 2023 06:53:10 +0000 Subject: [PATCH 24/45] Translated using Weblate (Russian) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ru/ --- app/src/main/res/values-ru/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index c317f58d..19f383e1 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -77,11 +77,11 @@ %d сообщений - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Ключевое слово + Блокируемые ключевые слова + Управление блокируемыми ключевыми словами + Сейчас блокировка по ключевым словам не выполняется. Здесь можно указать ключевые слова, чтобы заблокировать все содержащиие их сообщения. + Добавить блокируемое ключевое слово Отображение уведомлений на экране блокировки Отправитель и сообщение Только отправитель @@ -124,4 +124,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 From 705181e07674ab7e348bb97c216f3156f17124cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Tue, 11 Jul 2023 15:50:52 +0000 Subject: [PATCH 25/45] Translated using Weblate (Turkish) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/tr/ --- app/src/main/res/values-tr/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index adba85f5..856775ab 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -71,11 +71,11 @@ %d ileti - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Anahtar sözcük + Engellenen anahtar sözcükler + Engellenen anahtar sözcükleri yönet + Herhangi bir anahtar sözcük engellemiyorsunuz. Bunları içeren tüm mesajları engellemek için buraya anahtar sözcükler ekleyebilirsiniz. + Engellenen anahtar sözcük ekle Kilit ekranı bildirim görünürlüğü Gönderen ve ileti Yalnızca gönderen @@ -118,4 +118,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 From 2d6f05f0f5a794cae0708a23f766cc1c8b95aae5 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 10 Jul 2023 23:47:57 +0000 Subject: [PATCH 26/45] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/zh_Hans/ --- app/src/main/res/values-zh-rCN/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 52dbbe64..e0cdaf6b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -68,11 +68,11 @@ %d 个消息 - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + 关键词 + 关键词黑名单 + 管理关键词黑名单 + 你没有拦截任何关键词。你可以在此添加关键词来拦截包含它们的所有信息。 + 添加拦截关键词 锁屏通知可见性 发信人和消息 仅发信人 @@ -115,4 +115,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 From 8ec167da4e8ce953cc2bef8ecde2c9404e6f0e86 Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Wed, 12 Jul 2023 01:23:20 +0000 Subject: [PATCH 27/45] Translated using Weblate (Arabic) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ar/ --- app/src/main/res/values-ar/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index ea6f2d8d..eb60b8a2 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -83,11 +83,11 @@ %d رسائل - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + الكلمة الرئيسية + الكلمات الرئيسية المحظورة + إدارة الكلمات الرئيسية المحظورة + أنت لا تحظر أي كلمات رئيسية. يمكنك إضافة كلمات رئيسية هنا لمنع جميع الرسائل التي تحتوي عليها. + أضف كلمة أساسية محظورة رؤية اشعارات شاشة القفل المرسل والرسالة المرسل فقط @@ -130,4 +130,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 From 955374b4709a09125c3d98d7c9b57d199647437c Mon Sep 17 00:00:00 2001 From: "Josep M. Ferrer" Date: Tue, 11 Jul 2023 11:42:36 +0000 Subject: [PATCH 28/45] Translated using Weblate (Catalan) Currently translated at 100.0% (86 of 86 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ca/ --- app/src/main/res/values-ca/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index e7f4299b..3086308f 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -71,11 +71,11 @@ %d missatges - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Paraula clau + Paraules clau blocades + Gestiona les paraules clau blocades + No heu blocat cap paraula clau. Aquí podeu afegir paraules clau per a bolcar tots els missatges que les continguin. + Afegeix una paraula clau blocada Visibilitat de notificacions a la pantalla de bloqueig Remitent i missatge Només el remitent @@ -118,4 +118,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 From 512a354f44f21b761145fb9fbf171535ecb6af93 Mon Sep 17 00:00:00 2001 From: Agnieszka C Date: Thu, 13 Jul 2023 03:57:01 +0000 Subject: [PATCH 29/45] Translated using Weblate (Polish) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/pl/ --- app/src/main/res/values-pl/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 9162b7ae..1b2e5817 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -49,11 +49,11 @@ Zaktualizuj wiadomość Wyślij teraz - Message details - Sender - Receiver - Sent at - Received at + Szczegóły wiadomości + Nadawca + Odbiorca + Wysłana + Odebrana Otrzymany SMS Nowa wiadomość From 3fc1ddbff991c7fca70aaae68bc057791f33ac37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 13 Jul 2023 16:05:41 +0200 Subject: [PATCH 30/45] Update android-smsmms to include https://github.com/tibbi/android-smsmms/pull/14 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a1171569..a8415707 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'com.github.SimpleMobileTools:Simple-Commons:b4cc381943' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' - implementation 'com.github.esensar:android-smsmms:f6551b0b4f' + implementation 'com.github.esensar:android-smsmms:79bfe13058' implementation "me.leolin:ShortcutBadger:1.1.22" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' From ca6620603484183f300f62f36a1025bcad8770fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 14 Jul 2023 09:39:32 +0200 Subject: [PATCH 31/45] Update android-smsmms ref to use tibbi fork --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a8415707..08e4e769 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'com.github.SimpleMobileTools:Simple-Commons:b4cc381943' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' - implementation 'com.github.esensar:android-smsmms:79bfe13058' + implementation 'com.github.tibbi:android-smsmms:5657799572' implementation "me.leolin:ShortcutBadger:1.1.22" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' From 17f1bf62b15f6d01766a35ebd1116b9eb7aef801 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 14 Jul 2023 10:00:06 +0200 Subject: [PATCH 32/45] removing a redundant type definition --- .../smsmessenger/receivers/DirectReplyReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt index f9c1d845..d04aaee1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/DirectReplyReceiver.kt @@ -37,7 +37,7 @@ class DirectReplyReceiver : BroadcastReceiver() { } ensureBackgroundThread { - var messageId: Long = 0L + var messageId = 0L try { context.sendMessageCompat(body, listOf(address), subscriptionId, emptyList()) val message = context.getMessages(threadId, getImageResolutions = false, includeScheduledMessages = false, limit = 1).lastOrNull() From 2a5eff964c0fcbf9e5473a492a594f6774ff94ec Mon Sep 17 00:00:00 2001 From: spkprs Date: Fri, 14 Jul 2023 14:28:18 +0300 Subject: [PATCH 33/45] Update strings.xml --- app/src/main/res/values-el/strings.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 986af1aa..8ce3943e 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -47,11 +47,11 @@ Ενημέρωση μηνύματος Αποστολή τώρα - Message details - Sender - Receiver - Sent at - Received at + Λεπτομέρειες μηνύματος + Αποστολέας + Παραλήπτης + Εστάλη στις + Ελήφθη στις Ελήφθη SMS Νέο μήνυμα @@ -71,11 +71,11 @@ %d μηνύματα - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Λέξη-κλειδί + Αποκλεισμένες λέξεις-κλειδιά + Διαχείριση αποκλεισμένων λέξεων-κλειδιών + Δεν αποκλείετε καμία λέξη-κλειδί. Μπορείτε να προσθέσετε λέξεις-κλειδιά εδώ για να αποκλείσετε όλα τα μηνύματα που τα περιέχουν. + Προσθέστε μια αποκλεισμένη λέξη-κλειδί Εμφάνιση ειδοπ/σεων σε Κλειδωμένη οθόνη Αποστολέας και μήνυμα Αποστολέας μόνο From 2c2c629a5c09c96ccf0fc69b28171ea3037984c2 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 13 Jul 2023 11:57:27 +0000 Subject: [PATCH 34/45] Translated using Weblate (Dutch) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/nl/ --- app/src/main/res/values-nl/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index a7e00389..22a331d1 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -47,11 +47,11 @@ Bericht aanpassen Nu versturen - Message details - Sender - Receiver - Sent at - Received at + Details + Afzender + Ontvanger + Verzonden op + Ontvangen op Ontvangen berichten Nieuw bericht From ba88dc8dcedb4f8d8fd7e8c9e1a970ff6fb2dd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Thu, 13 Jul 2023 16:17:28 +0000 Subject: [PATCH 35/45] Translated using Weblate (Turkish) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/tr/ --- app/src/main/res/values-tr/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 856775ab..f2183dab 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -48,10 +48,10 @@ Şimdi gönder Message details - Sender - Receiver - Sent at - Received at + Gönderen + Alıcı + Gönderildi + Alındı SMS alındı Yeni ileti From e9ff8bf323ff6dc4fd9a191e6e90843eedbf1ab7 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 14 Jul 2023 01:23:03 +0000 Subject: [PATCH 36/45] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/zh_Hans/ --- app/src/main/res/values-zh-rCN/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e0cdaf6b..b1e6a241 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -46,11 +46,11 @@ 更新消息 立即发送 - Message details - Sender - Receiver - Sent at - Received at + 消息详情 + 发送者 + 接收者 + 发送于 + 接收于 接收到的短信 新消息 From bce96691a3b42534bfe71e547c17461d215b2eaa Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Thu, 13 Jul 2023 14:54:41 +0000 Subject: [PATCH 37/45] Translated using Weblate (Arabic) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ar/ --- app/src/main/res/values-ar/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index eb60b8a2..cbe994ba 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -52,10 +52,10 @@ ارسل الان Message details - Sender - Receiver - Sent at - Received at + المرسل + المتلقي + أرسلت في + تلقيت في تم تلقي الرسائل القصيرة رسالة جديدة From ec65179a77570ff0fa1e6bbe19f00488f8dde7d5 Mon Sep 17 00:00:00 2001 From: "Josep M. Ferrer" Date: Thu, 13 Jul 2023 15:28:48 +0000 Subject: [PATCH 38/45] Translated using Weblate (Catalan) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ca/ --- app/src/main/res/values-ca/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 3086308f..a7cdf863 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -48,10 +48,10 @@ Envia ara Message details - Sender - Receiver - Sent at - Received at + Remitent + Receptor + Enviat a + Rebut a SMS rebut Missatge nou From 43c4c1395cd9acfc037aa7e29174b7a141da4cac Mon Sep 17 00:00:00 2001 From: elgratea Date: Fri, 14 Jul 2023 00:30:45 +0000 Subject: [PATCH 39/45] Translated using Weblate (Bulgarian) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/bg/ --- app/src/main/res/values-bg/strings.xml | 76 +++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index f321e301..74c3f518 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -21,37 +21,37 @@ Препращане Невъзможно е да се компресира изображението до избрания размер - Duplicate item was not included + Дублиращият се елемент не беше включен - and %d other - and %d others + и %d друг + и %d други Нов разговор Добавете контакт или номер… Предложения - Members - Conversation name - Conversation details - Rename conversation - Only you can see this conversation name + Членове + Име на разговора + Подробности за разговора + Преименуване на разговора + Само вие можете да видите името на този разговор - Scheduled message - Schedule message - Schedule send - Cancel schedule send - You must pick a time in the future - Keep the phone on and make sure there is nothing killing the app while in background. + Насрочено съобщение + Насрочи съобщение по график + Планирайте изпращане + Отмяна на насрочено изпращане + Трябва да изберете време в бъдещето + Дръжте телефона включен и се уверете, че нищо не убива приложението, докато е във фонов режим. Update message - Send now + Изпрати Сега Message details - Sender - Receiver - Sent at - Received at + Подател + Получател + Изпратено на + Получено на Получено съобщение Ново съобщение @@ -71,17 +71,17 @@ %d съобщения - Keyword - Blocked keywords - Manage blocked keywords - You are not blocking any keywords. You may add keywords here to block all messages containing them. - Add a blocked keyword + Ключова дума + Блокирани ключови думи + Управление на блокираните ключови думи + Не са блокирани ключови думи. Можете да добавите ключови думи тук, за да блокирате всички съобщения, които ги съдържат. + Добавяне на блокирана ключова дума Видимост на известие за съобщение при заключен екран Изпращач и съобщение Само изпращач Включи отчети за доставка Премахни ударенията и диактричните знаци при изпращане на съобщение - Send message on pressing Enter + Изпратете съобщение при натискане на Enter Промяна на размера на изпратените MMS изображения Без ограничения Изходящи съобщения @@ -97,25 +97,25 @@ Импортиране на MMS Трябва да изберете поне един елемент - Can\'t send message to an empty number - Unable to save message to the telephony database - Couldn\'t send message, service unavailable - Couldn\'t send message, radio turned off - Couldn\'t send message, carrier error - Couldn\'t send message, error code: %1$d - Can\'t reply to short codes like this - You can only reply to short codes with numbers like \"503501\" but not to codes containing letters and numbers like \"AB-CD0\". - Attachment size exceeds max MMS limit - SIM card not available + Не може да се изпрати съобщение до празен номер + Неуспешен запис на съобщението в телефонната база данни + Неуспешно изпращане на съобщението, услугата на оператора е недостъпна + Неуспешно изпращане на съобщението, радиото е изключено + Неуспешно изпращане на съобщението, грешка на оператора + Неуспешно изпращане на съобщението, код на грешката: %d + Невъзможен отговор на кратки кодове като този + Можете да отговаряте само на кратки кодове с цифри като \"503501\", но не и на кодове, съдържащи букви и цифри като \"AB-CD0\". + Размерът на прикачения файл надвишава максималното ограничение за MMS + SIM картата не е налична Защо приложението изисква достъп до интернет\? За съжаление това е нужно за изпращане на прикачени MMS. Да не може да се праща MMS би било наистина голям недостатък в сравнение с други приложения, така че решихме да тръгнем по този път. Въпреки това, както обикновено, няма реклами, следене или каквито и да е други анализаторски програми, интернетът се ползва само за изпращане на MMS. От другата страна не получават моя MMS, мога ли да направя нещо\? Размерът на MMS е ограничен от оператора, може да се опитате да зададете по-малък лимит в настройките на приложението. - Does the app support scheduled messages? - Yes, you can schedule messages to be sent in the future by long pressing the Send button and picking the desired date and time. + Приложението поддържа ли планирани съобщения\? + Да, можете да планирате изпращане на съобщения в бъдеще, като натиснете продължително бутона Изпрати и изберете желаната дата и час. - + \ No newline at end of file From 0ad178fddb9f05a12ea2085023e900c941eb25a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 15 Jul 2023 13:59:58 +0200 Subject: [PATCH 40/45] Rename JSON import constants to better reflect contents --- .../simplemobiletools/smsmessenger/activities/MainActivity.kt | 4 ++-- .../com/simplemobiletools/smsmessenger/helpers/Constants.kt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index 4298014e..6b87f3f9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -626,8 +626,8 @@ class MainActivity : SimpleActivity() { if (isQPlus()) { Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) - type = EXPORT_MIME_TYPE - putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(EXPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) + type = JSON_IMPORT_MIME_TYPE + putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_IMPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) try { startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) 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 73f3d271..3f9cdf93 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -30,6 +30,7 @@ const val EXPORT_SMS = "export_sms" const val EXPORT_MMS = "export_mms" const val EXPORT_MIME_TYPE = "application/json" const val EXPORT_FILE_EXT = ".json" +const val JSON_IMPORT_MIME_TYPE = "application/json" const val XML_IMPORT_MIME_TYPE = "text/xml" const val IMPORT_SMS = "import_sms" const val IMPORT_MMS = "import_mms" From a6b97698bf0b42d2fde671be8be981825ccc3356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 15 Jul 2023 16:24:32 +0200 Subject: [PATCH 41/45] Update mime type and file extension constants for clarity --- .../smsmessenger/activities/MainActivity.kt | 6 +++--- .../smsmessenger/dialogs/ExportMessagesDialog.kt | 4 ++-- .../simplemobiletools/smsmessenger/helpers/Constants.kt | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index 6b87f3f9..df266d4f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -582,7 +582,7 @@ class MainActivity : SimpleActivity() { if (isQPlus()) { ExportMessagesDialog(this, config.lastExportPath, true) { file -> Intent(Intent.ACTION_CREATE_DOCUMENT).apply { - type = EXPORT_MIME_TYPE + type = JSON_MIME_TYPE putExtra(Intent.EXTRA_TITLE, file.name) addCategory(Intent.CATEGORY_OPENABLE) @@ -626,8 +626,8 @@ class MainActivity : SimpleActivity() { if (isQPlus()) { Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) - type = JSON_IMPORT_MIME_TYPE - putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_IMPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) + type = JSON_MIME_TYPE + putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_MIME_TYPE, XML_MIME_TYPE)) try { startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt index 56c9791d..fbc451e4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt @@ -7,7 +7,7 @@ import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity import com.simplemobiletools.smsmessenger.extensions.config -import com.simplemobiletools.smsmessenger.helpers.EXPORT_FILE_EXT +import com.simplemobiletools.smsmessenger.helpers.JSON_FILE_EXT import kotlinx.android.synthetic.main.dialog_export_messages.view.* import java.io.File @@ -51,7 +51,7 @@ class ExportMessagesDialog( when { filename.isEmpty() -> activity.toast(R.string.empty_name) filename.isAValidFilename() -> { - val file = File(realPath, "$filename$EXPORT_FILE_EXT") + val file = File(realPath, "$filename$JSON_FILE_EXT") if (!hidePath && file.exists()) { activity.toast(R.string.name_taken) return@setOnClickListener 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 3f9cdf93..cb22b91d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -28,10 +28,9 @@ const val PINNED_CONVERSATIONS = "pinned_conversations" const val BLOCKED_KEYWORDS = "blocked_keywords" const val EXPORT_SMS = "export_sms" const val EXPORT_MMS = "export_mms" -const val EXPORT_MIME_TYPE = "application/json" -const val EXPORT_FILE_EXT = ".json" -const val JSON_IMPORT_MIME_TYPE = "application/json" -const val XML_IMPORT_MIME_TYPE = "text/xml" +const val JSON_FILE_EXT = ".json" +const val JSON_MIME_TYPE = "application/json" +const val XML_MIME_TYPE = "text/xml" const val IMPORT_SMS = "import_sms" const val IMPORT_MMS = "import_mms" const val WAS_DB_CLEARED = "was_db_cleared_2" From a35edce84a7445d004479893e6d961167303a28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 15 Jul 2023 16:32:33 +0200 Subject: [PATCH 42/45] Add support for .txt files for importing --- .../smsmessenger/activities/MainActivity.kt | 2 +- .../smsmessenger/helpers/Constants.kt | 1 + .../smsmessenger/helpers/MessagesImporter.kt | 22 +++++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index df266d4f..5c6a1b5b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -627,7 +627,7 @@ class MainActivity : SimpleActivity() { Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) type = JSON_MIME_TYPE - putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_MIME_TYPE, XML_MIME_TYPE)) + putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_MIME_TYPE, XML_MIME_TYPE, TXT_MIME_TYPE)) try { startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) 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 cb22b91d..0b7415f2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -31,6 +31,7 @@ const val EXPORT_MMS = "export_mms" const val JSON_FILE_EXT = ".json" const val JSON_MIME_TYPE = "application/json" const val XML_MIME_TYPE = "text/xml" +const val TXT_MIME_TYPE = "text/plain" const val IMPORT_SMS = "import_sms" const val IMPORT_MMS = "import_mms" const val WAS_DB_CLEARED = "was_db_cleared_2" diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesImporter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesImporter.kt index 89c91cf3..28ac0687 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesImporter.kt @@ -32,13 +32,19 @@ class MessagesImporter(private val context: Context) { fun importMessages(path: String, onProgress: (total: Int, current: Int) -> Unit = { _, _ -> }, callback: (result: ImportResult) -> Unit) { ensureBackgroundThread { try { - val inputStream = if (path.contains("/")) { - File(path).inputStream() + val isXml = if (path.endsWith("txt")) { + // Need to read the first line to determine if it is xml + val tempStream = getInputStreamForPath(path) + tempStream.bufferedReader().use { + it.readLine().startsWith(" val jsonReader = gson.newJsonReader(reader) From c79242f571e79f5c9dc6cd1f171aa12ca9c69099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 15 Jul 2023 16:33:21 +0200 Subject: [PATCH 43/45] Rename JSON_FILE_EXT to JSON_FILE_EXTENSION --- .../smsmessenger/dialogs/ExportMessagesDialog.kt | 4 ++-- .../com/simplemobiletools/smsmessenger/helpers/Constants.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt index fbc451e4..86067596 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/ExportMessagesDialog.kt @@ -7,7 +7,7 @@ import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity import com.simplemobiletools.smsmessenger.extensions.config -import com.simplemobiletools.smsmessenger.helpers.JSON_FILE_EXT +import com.simplemobiletools.smsmessenger.helpers.JSON_FILE_EXTENSION import kotlinx.android.synthetic.main.dialog_export_messages.view.* import java.io.File @@ -51,7 +51,7 @@ class ExportMessagesDialog( when { filename.isEmpty() -> activity.toast(R.string.empty_name) filename.isAValidFilename() -> { - val file = File(realPath, "$filename$JSON_FILE_EXT") + val file = File(realPath, "$filename$JSON_FILE_EXTENSION") if (!hidePath && file.exists()) { activity.toast(R.string.name_taken) return@setOnClickListener 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 0b7415f2..3bade2ac 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -28,7 +28,7 @@ const val PINNED_CONVERSATIONS = "pinned_conversations" const val BLOCKED_KEYWORDS = "blocked_keywords" const val EXPORT_SMS = "export_sms" const val EXPORT_MMS = "export_mms" -const val JSON_FILE_EXT = ".json" +const val JSON_FILE_EXTENSION = ".json" const val JSON_MIME_TYPE = "application/json" const val XML_MIME_TYPE = "text/xml" const val TXT_MIME_TYPE = "text/plain" From 5a0e9d26fcd786792cc0a99b7b1a8e13d7050850 Mon Sep 17 00:00:00 2001 From: solokot Date: Sat, 15 Jul 2023 10:47:50 +0000 Subject: [PATCH 44/45] Translated using Weblate (Russian) Currently translated at 100.0% (91 of 91 strings) Translation: Simple Mobile Tools/Simple SMS Messenger Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-sms-messenger/ru/ --- app/src/main/res/values-ru/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 19f383e1..f289dd76 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -49,11 +49,11 @@ Обновить сообщение Отправить сейчас - Message details - Sender - Receiver - Sent at - Received at + Сведения о сообщении + Отправитель + Получатель + Отправлено в + Получено в Получено сообщение Новое сообщение From 222b96e8c58e9d91e6a9c0a79d244535c80056f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sun, 16 Jul 2023 16:25:29 +0200 Subject: [PATCH 45/45] Remove ApnUtils usage in the app Using ApnUtils causes crash on newer Android versions (https://github.com/SimpleMobileTools/Simple-SMS-Messenger/pull/683#issuecomment-1637036718) This reverts this part of changes from https://github.com/SimpleMobileTools/Simple-SMS-Messenger/pull/687, since other changes have fixed the issue. This part is not as important (required to send reception ACK to MMSC, which is apparently not needed for all carriers) --- .../com/simplemobiletools/smsmessenger/App.kt | 6 -- .../smsmessenger/receivers/MmsReceiver.kt | 58 ------------------- 2 files changed, 64 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt index c5f624f6..5f76354e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/App.kt @@ -1,17 +1,11 @@ package com.simplemobiletools.smsmessenger import android.app.Application -import com.klinker.android.send_message.ApnUtils import com.simplemobiletools.commons.extensions.checkUseEnglish -import com.simplemobiletools.commons.helpers.isRPlus class App : Application() { override fun onCreate() { super.onCreate() checkUseEnglish() - - if (isRPlus()) { - ApnUtils.initDefaultApns(this) {} - } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt index b5097cc7..8fdab1ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsReceiver.kt @@ -4,17 +4,11 @@ import android.content.Context import android.net.Uri import android.os.Handler import android.os.Looper -import android.preference.PreferenceManager -import android.provider.Telephony import com.bumptech.glide.Glide import com.klinker.android.send_message.MmsReceivedReceiver -import com.simplemobiletools.commons.extensions.getStringValue import com.simplemobiletools.commons.extensions.isNumberBlocked import com.simplemobiletools.commons.extensions.normalizePhoneNumber -import com.simplemobiletools.commons.extensions.queryCursor import com.simplemobiletools.commons.helpers.ensureBackgroundThread -import com.simplemobiletools.commons.helpers.isQPlus -import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.refreshMessages @@ -22,58 +16,6 @@ import com.simplemobiletools.smsmessenger.helpers.refreshMessages // more info at https://github.com/klinker41/android-smsmms class MmsReceiver : MmsReceivedReceiver() { - private var carriers = mutableMapOf() - - private fun populateMmscInformation(context: Context, subscriptionId: Int) { - if (isRPlus() && carriers.isNotEmpty()) { - // This information is stored by ApnUtils from android-smsmms - PreferenceManager.getDefaultSharedPreferences(context).apply { - carriers[0] = MmscInformation( - getString("mmsc_url", ""), - getString("mms_proxy", ""), - getString("mms_port", "0")?.toInt() ?: 0 - ) - } - } else { - if (carriers.containsKey(subscriptionId).not()) { - val baseUri = if (isQPlus()) { - Telephony.Carriers.SIM_APN_URI - } else { - Telephony.Carriers.CONTENT_URI - } - val uri = Uri.withAppendedPath(baseUri, subscriptionId.toString()) - val projection = arrayOf( - Telephony.Carriers.MMSC, - Telephony.Carriers.MMSPROXY, - Telephony.Carriers.MMSPORT, - ) - val selection = "${Telephony.Carriers.TYPE} LIKE ?" - val selectionArgs = arrayOf("%mms%") - - context.queryCursor(uri, projection = projection, selection = selection, selectionArgs = selectionArgs) { cursor -> - carriers[subscriptionId] = MmscInformation( - cursor.getStringValue(Telephony.Carriers.MMSC), - cursor.getStringValue(Telephony.Carriers.MMSPROXY), - cursor.getStringValue(Telephony.Carriers.MMSPORT).toIntOrNull() ?: 0, - ) - } - } - } - } - - private fun getMmscInformation(subscriptionId: Int): MmscInformation? { - return if (isRPlus()) { - carriers[0] - } else { - carriers[subscriptionId] - } - } - - override fun getMmscInfoForReceptionAck(context: Context, subscriptionId: Int): MmscInformation? { - populateMmscInformation(context, subscriptionId) - return getMmscInformation(subscriptionId) - } - override fun isAddressBlocked(context: Context, address: String): Boolean { val normalizedAddress = address.normalizePhoneNumber() return context.isNumberBlocked(normalizedAddress)