From 47861f605d6a5bb7e7050c522a254901fdabae76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 11 Jul 2023 16:52:47 +0200 Subject: [PATCH 01/19] Add support for archiving conversations Archiving messages currently acts like recycle bin in Simple Gallery, meaning that after 30 days, conversations will be deleted permanently. Any updates to the conversation (new messages) removes it from archive. This closes #177 --- app/src/main/AndroidManifest.xml | 7 + .../ArchivedConversationsActivity.kt | 150 ++++++++++++++ .../smsmessenger/activities/MainActivity.kt | 18 +- .../activities/SettingsActivity.kt | 43 ++++ .../smsmessenger/activities/ThreadActivity.kt | 10 +- .../adapters/ArchivedConversationsAdapter.kt | 94 +++++++++ .../adapters/BaseConversationsAdapter.kt | 183 +++++++++++++++++ .../adapters/ConversationsAdapter.kt | 184 +----------------- .../databases/MessagesDatabase.kt | 16 +- .../dialogs/DeleteConfirmationDialog.kt | 39 ++++ .../smsmessenger/extensions/Context.kt | 38 ++++ .../smsmessenger/helpers/Config.kt | 8 + .../smsmessenger/helpers/Constants.kt | 2 + .../interfaces/ConversationsDao.kt | 33 +++- .../models/ArchivedConversation.kt | 15 ++ .../smsmessenger/receivers/SmsReceiver.kt | 1 + .../activity_archived_conversations.xml | 83 ++++++++ app/src/main/res/layout/activity_settings.xml | 49 +++++ .../res/layout/dialog_delete_confirmation.xml | 26 +++ app/src/main/res/menu/archive_menu.xml | 11 ++ .../res/menu/cab_archived_conversations.xml | 22 +++ app/src/main/res/menu/menu_main.xml | 5 + 22 files changed, 846 insertions(+), 191 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ArchivedConversationsActivity.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/BaseConversationsAdapter.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/ArchivedConversation.kt create mode 100644 app/src/main/res/layout/activity_archived_conversations.xml create mode 100644 app/src/main/res/layout/dialog_delete_confirmation.xml create mode 100644 app/src/main/res/menu/archive_menu.xml create mode 100644 app/src/main/res/menu/cab_archived_conversations.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3820008d..c94576e3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -51,6 +51,13 @@ android:configChanges="orientation" android:exported="true" /> + + + when (menuItem.itemId) { + R.id.empty_archive -> removeAll() + else -> return@setOnMenuItemClickListener false + } + return@setOnMenuItemClickListener true + } + } + + private fun updateMenuColors() { + updateStatusbarColor(getProperBackgroundColor()) + } + + private fun loadArchivedConversations() { + ensureBackgroundThread { + val conversations = try { + conversationsDB.getAllArchived().toMutableList() as ArrayList + } catch (e: Exception) { + ArrayList() + } + + runOnUiThread { + setupConversations(conversations) + } + } + + bus = EventBus.getDefault() + try { + bus!!.register(this) + } catch (e: Exception) { + } + } + + private fun removeAll() { + removeAllArchivedConversations { + loadArchivedConversations() + } + } + + private fun getOrCreateConversationsAdapter(): ArchivedConversationsAdapter { + var currAdapter = conversations_list.adapter + if (currAdapter == null) { + hideKeyboard() + currAdapter = ArchivedConversationsAdapter( + activity = this, + recyclerView = conversations_list, + onRefresh = { notifyDatasetChanged() }, + itemClick = { handleConversationClick(it) } + ) + + conversations_list.adapter = currAdapter + if (areSystemAnimationsEnabled) { + conversations_list.scheduleLayoutAnimation() + } + } + return currAdapter as ArchivedConversationsAdapter + } + + private fun setupConversations(conversations: ArrayList) { + val sortedConversations = conversations.sortedWith( + compareByDescending { config.pinnedConversations.contains(it.threadId.toString()) } + .thenByDescending { it.date } + ).toMutableList() as ArrayList + + showOrHidePlaceholder(conversations.isEmpty()) + + try { + getOrCreateConversationsAdapter().apply { + updateConversations(sortedConversations) + } + } catch (ignored: Exception) { + } + } + + private fun showOrHidePlaceholder(show: Boolean) { + conversations_fastscroller.beGoneIf(show) + no_conversations_placeholder.beVisibleIf(show) + no_conversations_placeholder.text = getString(R.string.no_conversations_found) + } + + @SuppressLint("NotifyDataSetChanged") + private fun notifyDatasetChanged() { + getOrCreateConversationsAdapter().notifyDataSetChanged() + } + + private fun handleConversationClick(any: Any) { + Intent(this, ThreadActivity::class.java).apply { + val conversation = any as Conversation + putExtra(THREAD_ID, conversation.threadId) + putExtra(THREAD_TITLE, conversation.title) + putExtra(WAS_PROTECTION_HANDLED, true) + startActivity(this) + } + } + + @Subscribe(threadMode = ThreadMode.MAIN) + fun refreshMessages(event: Events.RefreshMessages) { + loadArchivedConversations() + } +} 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..119b357b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -64,6 +64,7 @@ class MainActivity : SimpleActivity() { updateMaterialActivityViews(main_coordinator, conversations_list, useTransparentNavigation = true, useTopSearchMenu = true) if (savedInstanceState == null) { + checkAndDeleteOldArchivedConversations() handleAppPasswordProtection { wasProtectionHandled = it if (it) { @@ -177,6 +178,7 @@ class MainActivity : SimpleActivity() { R.id.import_messages -> tryImportMessages() R.id.export_messages -> tryToExportMessages() R.id.more_apps_from_us -> launchMoreAppsFromUsIntent() + R.id.show_archived -> launchArchivedConversations() R.id.settings -> launchSettings() R.id.about -> launchAbout() else -> return@setOnMenuItemClickListener false @@ -289,15 +291,20 @@ class MainActivity : SimpleActivity() { private fun getCachedConversations() { ensureBackgroundThread { val conversations = try { - conversationsDB.getAll().toMutableList() as ArrayList + conversationsDB.getNonArchived().toMutableList() as ArrayList } catch (e: Exception) { ArrayList() } + val archived = try { + conversationsDB.getAllArchived() + } catch (e: Exception) { + listOf() + } updateUnreadCountBadge(conversations) runOnUiThread { setupConversations(conversations, cached = true) - getNewConversations(conversations) + getNewConversations((conversations + archived).toMutableList() as ArrayList) } conversations.forEach { clearExpiredScheduledMessages(it.threadId) @@ -351,7 +358,7 @@ class MainActivity : SimpleActivity() { } } - val allConversations = conversationsDB.getAll() as ArrayList + val allConversations = conversationsDB.getNonArchived() as ArrayList runOnUiThread { setupConversations(allConversations) } @@ -556,6 +563,11 @@ class MainActivity : SimpleActivity() { } } + private fun launchArchivedConversations() { + hideKeyboard() + startActivity(Intent(applicationContext, ArchivedConversationsActivity::class.java)) + } + private fun launchSettings() { hideKeyboard() startActivity(Intent(applicationContext, SettingsActivity::class.java)) 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..5cdd53a6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt @@ -11,12 +11,15 @@ import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.extensions.config +import com.simplemobiletools.smsmessenger.extensions.conversationsDB +import com.simplemobiletools.smsmessenger.extensions.removeAllArchivedConversations import com.simplemobiletools.smsmessenger.helpers.* import kotlinx.android.synthetic.main.activity_settings.* import java.util.* class SettingsActivity : SimpleActivity() { private var blockedNumbersAtPause = -1 + private var recycleBinConversations = 0 override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true @@ -47,6 +50,8 @@ class SettingsActivity : SimpleActivity() { setupGroupMessageAsMMS() setupLockScreenVisibility() setupMMSFileSizeLimit() + setupUseRecycleBin() + setupEmptyRecycleBin() setupAppPasswordProtection() updateTextColors(settings_nested_scrollview) @@ -59,6 +64,7 @@ class SettingsActivity : SimpleActivity() { settings_general_settings_label, settings_outgoing_messages_label, settings_notifications_label, + settings_recycle_bin_label, settings_security_label ).forEach { it.setTextColor(getProperPrimaryColor()) @@ -244,6 +250,43 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupUseRecycleBin() { + updateRecycleBinButtons() + settings_use_recycle_bin.isChecked = config.useArchive + settings_use_recycle_bin_holder.setOnClickListener { + settings_use_recycle_bin.toggle() + config.useArchive = settings_use_recycle_bin.isChecked + updateRecycleBinButtons() + } + } + + private fun updateRecycleBinButtons() { + settings_empty_recycle_bin_holder.beVisibleIf(config.useArchive) + } + + private fun setupEmptyRecycleBin() { + ensureBackgroundThread { + recycleBinConversations = conversationsDB.getArchivedCount() + runOnUiThread { + settings_empty_recycle_bin_size.text = + resources.getQuantityString(R.plurals.delete_conversations, recycleBinConversations, recycleBinConversations) + } + } + + settings_empty_recycle_bin_holder.setOnClickListener { + if (recycleBinConversations == 0) { + toast(R.string.recycle_bin_empty) + } else { + ConfirmationDialog(this, "", R.string.empty_recycle_bin_confirmation, R.string.yes, R.string.no) { + removeAllArchivedConversations() + recycleBinConversations = 0 + settings_empty_recycle_bin_size.text = + resources.getQuantityString(R.plurals.delete_conversations, recycleBinConversations, recycleBinConversations) + } + } + } + } + private fun setupAppPasswordProtection() { settings_app_password_protection.isChecked = config.isAppPasswordProtectionOn settings_app_password_protection_holder.setOnClickListener { 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..e524f349 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -55,6 +55,7 @@ import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.adapters.AttachmentsAdapter import com.simplemobiletools.smsmessenger.adapters.AutoCompleteTextViewAdapter import com.simplemobiletools.smsmessenger.adapters.ThreadAdapter +import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog import com.simplemobiletools.smsmessenger.dialogs.InvalidNumberDialog import com.simplemobiletools.smsmessenger.dialogs.RenameConversationDialog import com.simplemobiletools.smsmessenger.dialogs.ScheduleMessageDialog @@ -888,9 +889,13 @@ class ThreadActivity : SimpleActivity() { } private fun askConfirmDelete() { - ConfirmationDialog(this, getString(R.string.delete_whole_conversation_confirmation)) { + DeleteConfirmationDialog(this, getString(R.string.delete_whole_conversation_confirmation), config.useArchive) { skipRecycleBin -> ensureBackgroundThread { - deleteConversation(threadId) + if (skipRecycleBin || config.useArchive.not()) { + deleteConversation(threadId) + } else { + moveConversationToRecycleBin(threadId) + } runOnUiThread { refreshMessages() finish() @@ -1327,6 +1332,7 @@ class ThreadActivity : SimpleActivity() { } } messagesDB.insertOrUpdate(message) + conversationsDB.deleteThreadFromArchivedConversations(message.threadId) } // show selected contacts, properly split to new lines when appropriate diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt new file mode 100644 index 00000000..b1050197 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt @@ -0,0 +1,94 @@ +package com.simplemobiletools.smsmessenger.adapters + +import android.view.Menu +import com.simplemobiletools.commons.extensions.notificationManager +import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.views.MyRecyclerView +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.activities.SimpleActivity +import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog +import com.simplemobiletools.smsmessenger.extensions.conversationsDB +import com.simplemobiletools.smsmessenger.extensions.deleteConversation +import com.simplemobiletools.smsmessenger.helpers.refreshMessages +import com.simplemobiletools.smsmessenger.models.Conversation + +class ArchivedConversationsAdapter( + activity: SimpleActivity, recyclerView: MyRecyclerView, onRefresh: () -> Unit, itemClick: (Any) -> Unit +) : BaseConversationsAdapter(activity, recyclerView, onRefresh, itemClick) { + override fun getActionMenuId() = R.menu.cab_archived_conversations + + override fun prepareActionMode(menu: Menu) {} + + override fun actionItemPressed(id: Int) { + if (selectedKeys.isEmpty()) { + return + } + + when (id) { + R.id.cab_delete -> askConfirmDelete() + R.id.cab_unarchive -> ensureBackgroundThread { unarchiveConversation() } + R.id.cab_select_all -> selectAll() + } + } + + private fun askConfirmDelete() { + val itemsCnt = selectedKeys.size + val items = resources.getQuantityString(R.plurals.delete_conversations, itemsCnt, itemsCnt) + + val baseString = R.string.deletion_confirmation + val question = String.format(resources.getString(baseString), items) + + DeleteConfirmationDialog(activity, question, showSkipRecycleBinOption = false) { _ -> + ensureBackgroundThread { + deleteConversations() + } + } + } + + private fun deleteConversations() { + if (selectedKeys.isEmpty()) { + return + } + + val conversationsToRemove = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList + conversationsToRemove.forEach { + activity.deleteConversation(it.threadId) + activity.notificationManager.cancel(it.threadId.hashCode()) + } + + removeConversationsFromList(conversationsToRemove) + } + + private fun unarchiveConversation() { + if (selectedKeys.isEmpty()) { + return + } + + val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList + conversationsToUnarchive.forEach { + activity.conversationsDB.deleteThreadFromArchivedConversations(it.threadId) + } + + removeConversationsFromList(conversationsToUnarchive) + } + + private fun removeConversationsFromList(removedConversations: List) { + val newList = try { + currentList.toMutableList().apply { removeAll(removedConversations) } + } catch (ignored: Exception) { + currentList.toMutableList() + } + + activity.runOnUiThread { + if (newList.none { selectedKeys.contains(it.hashCode()) }) { + refreshMessages() + finishActMode() + } else { + submitList(newList) + if (newList.isEmpty()) { + refreshMessages() + } + } + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/BaseConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/BaseConversationsAdapter.kt new file mode 100644 index 00000000..17ba7623 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/BaseConversationsAdapter.kt @@ -0,0 +1,183 @@ +package com.simplemobiletools.smsmessenger.adapters + +import android.graphics.Typeface +import android.os.Parcelable +import android.util.TypedValue +import android.view.View +import android.view.ViewGroup +import android.widget.TextView +import androidx.recyclerview.widget.DiffUtil +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller +import com.simplemobiletools.commons.adapters.MyRecyclerViewListAdapter +import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.SimpleContactsHelper +import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.views.MyRecyclerView +import com.simplemobiletools.smsmessenger.R +import com.simplemobiletools.smsmessenger.activities.SimpleActivity +import com.simplemobiletools.smsmessenger.extensions.* +import com.simplemobiletools.smsmessenger.models.Conversation +import kotlinx.android.synthetic.main.item_conversation.view.* + +@Suppress("LeakingThis") +abstract class BaseConversationsAdapter( + activity: SimpleActivity, recyclerView: MyRecyclerView, onRefresh: () -> Unit, itemClick: (Any) -> Unit +) : MyRecyclerViewListAdapter(activity, recyclerView, ConversationDiffCallback(), itemClick, onRefresh), + RecyclerViewFastScroller.OnPopupTextUpdate { + private var fontSize = activity.getTextSize() + private var drafts = HashMap() + + private var recyclerViewState: Parcelable? = null + + init { + setupDragListener(true) + ensureBackgroundThread { + fetchDrafts(drafts) + } + setHasStableIds(true) + + registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() { + override fun onChanged() = restoreRecyclerViewState() + override fun onItemRangeMoved(fromPosition: Int, toPosition: Int, itemCount: Int) = restoreRecyclerViewState() + override fun onItemRangeInserted(positionStart: Int, itemCount: Int) = restoreRecyclerViewState() + }) + } + + fun updateFontSize() { + fontSize = activity.getTextSize() + notifyDataSetChanged() + } + + fun updateConversations(newConversations: ArrayList, commitCallback: (() -> Unit)? = null) { + saveRecyclerViewState() + submitList(newConversations.toList(), commitCallback) + } + + fun updateDrafts() { + ensureBackgroundThread { + val newDrafts = HashMap() + fetchDrafts(newDrafts) + if (drafts.hashCode() != newDrafts.hashCode()) { + drafts = newDrafts + activity.runOnUiThread { + notifyDataSetChanged() + } + } + } + } + + override fun getSelectableItemCount() = itemCount + + protected fun getSelectedItems() = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList + + override fun getIsItemSelectable(position: Int) = true + + override fun getItemSelectionKey(position: Int) = currentList.getOrNull(position)?.hashCode() + + override fun getItemKeyPosition(key: Int) = currentList.indexOfFirst { it.hashCode() == key } + + override fun onActionModeCreated() {} + + override fun onActionModeDestroyed() {} + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_conversation, parent) + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val conversation = getItem(position) + holder.bindView(conversation, allowSingleClick = true, allowLongClick = true) { itemView, _ -> + setupView(itemView, conversation) + } + bindViewHolder(holder) + } + + override fun getItemId(position: Int) = getItem(position).threadId + + override fun onViewRecycled(holder: ViewHolder) { + super.onViewRecycled(holder) + if (!activity.isDestroyed && !activity.isFinishing) { + Glide.with(activity).clear(holder.itemView.conversation_image) + } + } + + private fun fetchDrafts(drafts: HashMap) { + drafts.clear() + for ((threadId, draft) in activity.getAllDrafts()) { + drafts[threadId] = draft + } + } + + private fun setupView(view: View, conversation: Conversation) { + view.apply { + setupViewBackground(activity) + val smsDraft = drafts[conversation.threadId] + draft_indicator.beVisibleIf(smsDraft != null) + draft_indicator.setTextColor(properPrimaryColor) + + pin_indicator.beVisibleIf(activity.config.pinnedConversations.contains(conversation.threadId.toString())) + pin_indicator.applyColorFilter(textColor) + + conversation_frame.isSelected = selectedKeys.contains(conversation.hashCode()) + + conversation_address.apply { + text = conversation.title + setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 1.2f) + } + + conversation_body_short.apply { + text = smsDraft ?: conversation.snippet + setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.9f) + } + + conversation_date.apply { + text = conversation.date.formatDateOrTime(context, true, false) + setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.8f) + } + + val style = if (conversation.read) { + conversation_body_short.alpha = 0.7f + if (conversation.isScheduled) Typeface.ITALIC else Typeface.NORMAL + } else { + conversation_body_short.alpha = 1f + if (conversation.isScheduled) Typeface.BOLD_ITALIC else Typeface.BOLD + + } + conversation_address.setTypeface(null, style) + conversation_body_short.setTypeface(null, style) + + arrayListOf(conversation_address, conversation_body_short, conversation_date).forEach { + it.setTextColor(textColor) + } + + // at group conversations we use an icon as the placeholder, not any letter + val placeholder = if (conversation.isGroupConversation) { + SimpleContactsHelper(context).getColoredGroupIcon(conversation.title) + } else { + null + } + + SimpleContactsHelper(context).loadContactImage(conversation.photoUri, conversation_image, conversation.title, placeholder) + } + } + + override fun onChange(position: Int) = currentList.getOrNull(position)?.title ?: "" + + private fun saveRecyclerViewState() { + recyclerViewState = recyclerView.layoutManager?.onSaveInstanceState() + } + + private fun restoreRecyclerViewState() { + recyclerView.layoutManager?.onRestoreInstanceState(recyclerViewState) + } + + private class ConversationDiffCallback : DiffUtil.ItemCallback() { + override fun areItemsTheSame(oldItem: Conversation, newItem: Conversation): Boolean { + return Conversation.areItemsTheSame(oldItem, newItem) + } + + override fun areContentsTheSame(oldItem: Conversation, newItem: Conversation): Boolean { + return Conversation.areContentsTheSame(oldItem, newItem) + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt index 4ba2f9e4..1b79472b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt @@ -1,59 +1,27 @@ package com.simplemobiletools.smsmessenger.adapters import android.content.Intent -import android.graphics.Typeface -import android.os.Parcelable import android.text.TextUtils -import android.util.TypedValue import android.view.Menu -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import androidx.recyclerview.widget.DiffUtil -import androidx.recyclerview.widget.RecyclerView -import com.bumptech.glide.Glide -import com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller -import com.simplemobiletools.commons.adapters.MyRecyclerViewListAdapter import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.FeatureLockedDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.KEY_PHONE -import com.simplemobiletools.commons.helpers.SimpleContactsHelper import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity +import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog import com.simplemobiletools.smsmessenger.dialogs.RenameConversationDialog import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.refreshMessages import com.simplemobiletools.smsmessenger.messaging.isShortCodeWithLetters import com.simplemobiletools.smsmessenger.models.Conversation -import kotlinx.android.synthetic.main.item_conversation.view.* class ConversationsAdapter( activity: SimpleActivity, recyclerView: MyRecyclerView, onRefresh: () -> Unit, itemClick: (Any) -> Unit -) : MyRecyclerViewListAdapter(activity, recyclerView, ConversationDiffCallback(), itemClick, onRefresh), - RecyclerViewFastScroller.OnPopupTextUpdate { - private var fontSize = activity.getTextSize() - private var drafts = HashMap() - - private var recyclerViewState: Parcelable? = null - - init { - setupDragListener(true) - ensureBackgroundThread { - fetchDrafts(drafts) - } - setHasStableIds(true) - - registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() { - override fun onChanged() = restoreRecyclerViewState() - override fun onItemRangeMoved(fromPosition: Int, toPosition: Int, itemCount: Int) = restoreRecyclerViewState() - override fun onItemRangeInserted(positionStart: Int, itemCount: Int) = restoreRecyclerViewState() - }) - } - +) : BaseConversationsAdapter(activity, recyclerView, onRefresh, itemClick) { override fun getActionMenuId() = R.menu.cab_conversations override fun prepareActionMode(menu: Menu) { @@ -95,37 +63,6 @@ class ConversationsAdapter( } } - override fun getSelectableItemCount() = itemCount - - override fun getIsItemSelectable(position: Int) = true - - override fun getItemSelectionKey(position: Int) = currentList.getOrNull(position)?.hashCode() - - override fun getItemKeyPosition(key: Int) = currentList.indexOfFirst { it.hashCode() == key } - - override fun onActionModeCreated() {} - - override fun onActionModeDestroyed() {} - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_conversation, parent) - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val conversation = getItem(position) - holder.bindView(conversation, allowSingleClick = true, allowLongClick = true) { itemView, _ -> - setupView(itemView, conversation) - } - bindViewHolder(holder) - } - - override fun getItemId(position: Int) = getItem(position).threadId - - override fun onViewRecycled(holder: ViewHolder) { - super.onViewRecycled(holder) - if (!activity.isDestroyed && !activity.isFinishing) { - Glide.with(activity).clear(holder.itemView.conversation_image) - } - } - private fun tryBlocking() { if (activity.isOrWasThankYouInstalled()) { askConfirmBlock() @@ -184,21 +121,25 @@ class ConversationsAdapter( val baseString = R.string.deletion_confirmation val question = String.format(resources.getString(baseString), items) - ConfirmationDialog(activity, question) { + DeleteConfirmationDialog(activity, question, activity.config.useArchive) { skipRecycleBin -> ensureBackgroundThread { - deleteConversations() + deleteConversations(skipRecycleBin) } } } - private fun deleteConversations() { + private fun deleteConversations(skipRecycleBin: Boolean) { if (selectedKeys.isEmpty()) { return } val conversationsToRemove = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList conversationsToRemove.forEach { - activity.deleteConversation(it.threadId) + if (skipRecycleBin || activity.config.useArchive.not()) { + activity.deleteConversation(it.threadId) + } else { + activity.moveConversationToRecycleBin(it.threadId) + } activity.notificationManager.cancel(it.threadId.hashCode()) } @@ -276,8 +217,6 @@ class ConversationsAdapter( } } - private fun getSelectedItems() = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList - private fun pinConversation(pin: Boolean) { val conversations = getSelectedItems() if (conversations.isEmpty()) { @@ -303,113 +242,10 @@ class ConversationsAdapter( menu.findItem(R.id.cab_unpin_conversation).isVisible = selectedConversations.any { pinnedConversations.contains(it.threadId.toString()) } } - private fun fetchDrafts(drafts: HashMap) { - drafts.clear() - for ((threadId, draft) in activity.getAllDrafts()) { - drafts[threadId] = draft - } - } - - fun updateFontSize() { - fontSize = activity.getTextSize() - notifyDataSetChanged() - } - - fun updateConversations(newConversations: ArrayList, commitCallback: (() -> Unit)? = null) { - saveRecyclerViewState() - submitList(newConversations.toList(), commitCallback) - } - - fun updateDrafts() { - ensureBackgroundThread { - val newDrafts = HashMap() - fetchDrafts(newDrafts) - if (drafts.hashCode() != newDrafts.hashCode()) { - drafts = newDrafts - activity.runOnUiThread { - notifyDataSetChanged() - } - } - } - } - - private fun setupView(view: View, conversation: Conversation) { - view.apply { - setupViewBackground(activity) - val smsDraft = drafts[conversation.threadId] - draft_indicator.beVisibleIf(smsDraft != null) - draft_indicator.setTextColor(properPrimaryColor) - - pin_indicator.beVisibleIf(activity.config.pinnedConversations.contains(conversation.threadId.toString())) - pin_indicator.applyColorFilter(textColor) - - conversation_frame.isSelected = selectedKeys.contains(conversation.hashCode()) - - conversation_address.apply { - text = conversation.title - setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 1.2f) - } - - conversation_body_short.apply { - text = smsDraft ?: conversation.snippet - setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.9f) - } - - conversation_date.apply { - text = conversation.date.formatDateOrTime(context, true, false) - setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.8f) - } - - val style = if (conversation.read) { - conversation_body_short.alpha = 0.7f - if (conversation.isScheduled) Typeface.ITALIC else Typeface.NORMAL - } else { - conversation_body_short.alpha = 1f - if (conversation.isScheduled) Typeface.BOLD_ITALIC else Typeface.BOLD - - } - conversation_address.setTypeface(null, style) - conversation_body_short.setTypeface(null, style) - - arrayListOf(conversation_address, conversation_body_short, conversation_date).forEach { - it.setTextColor(textColor) - } - - // at group conversations we use an icon as the placeholder, not any letter - val placeholder = if (conversation.isGroupConversation) { - SimpleContactsHelper(context).getColoredGroupIcon(conversation.title) - } else { - null - } - - SimpleContactsHelper(context).loadContactImage(conversation.photoUri, conversation_image, conversation.title, placeholder) - } - } - - override fun onChange(position: Int) = currentList.getOrNull(position)?.title ?: "" - private fun refreshConversations() { activity.runOnUiThread { refreshMessages() finishActMode() } } - - private fun saveRecyclerViewState() { - recyclerViewState = recyclerView.layoutManager?.onSaveInstanceState() - } - - private fun restoreRecyclerViewState() { - recyclerView.layoutManager?.onRestoreInstanceState(recyclerViewState) - } - - private class ConversationDiffCallback : DiffUtil.ItemCallback() { - override fun areItemsTheSame(oldItem: Conversation, newItem: Conversation): Boolean { - return Conversation.areItemsTheSame(oldItem, newItem) - } - - override fun areContentsTheSame(oldItem: Conversation, newItem: Conversation): Boolean { - return Conversation.areContentsTheSame(oldItem, newItem) - } - } } 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..db698255 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -12,12 +12,9 @@ import com.simplemobiletools.smsmessenger.interfaces.AttachmentsDao import com.simplemobiletools.smsmessenger.interfaces.ConversationsDao import com.simplemobiletools.smsmessenger.interfaces.MessageAttachmentsDao import com.simplemobiletools.smsmessenger.interfaces.MessagesDao -import com.simplemobiletools.smsmessenger.models.Attachment -import com.simplemobiletools.smsmessenger.models.Conversation -import com.simplemobiletools.smsmessenger.models.Message -import com.simplemobiletools.smsmessenger.models.MessageAttachment +import com.simplemobiletools.smsmessenger.models.* -@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 7) +@Database(entities = [Conversation::class, ArchivedConversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 8) @TypeConverters(Converters::class) abstract class MessagesDatabase : RoomDatabase() { @@ -44,6 +41,7 @@ abstract class MessagesDatabase : RoomDatabase() { .addMigrations(MIGRATION_4_5) .addMigrations(MIGRATION_5_6) .addMigrations(MIGRATION_6_7) + .addMigrations(MIGRATION_7_8) .build() } } @@ -115,5 +113,13 @@ abstract class MessagesDatabase : RoomDatabase() { } } } + + private val MIGRATION_7_8 = object : Migration(7, 8) { + override fun migrate(database: SupportSQLiteDatabase) { + database.apply { + execSQL("CREATE TABLE archived_conversations (`thread_id` INTEGER NOT NULL PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)") + } + } + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt new file mode 100644 index 00000000..f72a7513 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt @@ -0,0 +1,39 @@ +package com.simplemobiletools.smsmessenger.dialogs + +import android.app.Activity +import androidx.appcompat.app.AlertDialog +import com.simplemobiletools.commons.extensions.beGoneIf +import com.simplemobiletools.commons.extensions.getAlertDialogBuilder +import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.smsmessenger.R +import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.delete_remember_title +import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.skip_the_recycle_bin_checkbox + +class DeleteConfirmationDialog( + private val activity: Activity, + private val message: String, + private val showSkipRecycleBinOption: Boolean, + private val callback: (skipRecycleBin: Boolean) -> Unit +) { + + private var dialog: AlertDialog? = null + val view = activity.layoutInflater.inflate(R.layout.dialog_delete_confirmation, null)!! + + init { + view.delete_remember_title.text = message + view.skip_the_recycle_bin_checkbox.beGoneIf(!showSkipRecycleBinOption) + activity.getAlertDialogBuilder() + .setPositiveButton(R.string.yes) { _, _ -> dialogConfirmed() } + .setNegativeButton(R.string.no, null) + .apply { + activity.setupDialogStuff(view, this) { alertDialog -> + dialog = alertDialog + } + } + } + + private fun dialogConfirmed() { + dialog?.dismiss() + callback(view.skip_the_recycle_bin_checkbox.isChecked) + } +} 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..f9228f8e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -581,6 +581,35 @@ fun Context.insertNewSMS(address: String, subject: String, body: String, date: L } } +fun Context.checkAndDeleteOldArchivedConversations(callback: (() -> Unit)? = null) { + if (config.useArchive && config.lastArchiveCheck < System.currentTimeMillis() - DAY_SECONDS * 1000) { + config.lastArchiveCheck = System.currentTimeMillis() + ensureBackgroundThread { + try { + for (conversation in conversationsDB.getOldArchived(System.currentTimeMillis() - MONTH_SECONDS * 1000L)) { + deleteConversation(conversation.threadId) + } + callback?.invoke() + } catch (e: Exception) { + } + } + } +} + +fun Context.removeAllArchivedConversations(callback: (() -> Unit)? = null) { + ensureBackgroundThread { + try { + for (conversation in conversationsDB.getAllArchived()) { + deleteConversation(conversation.threadId) + } + toast(R.string.recycle_bin_emptied) + callback?.invoke() + } catch (e: Exception) { + toast(R.string.unknown_error_occurred) + } + } +} + fun Context.deleteConversation(threadId: Long) { var uri = Sms.CONTENT_URI val selection = "${Sms.THREAD_ID} = ?" @@ -602,6 +631,15 @@ fun Context.deleteConversation(threadId: Long) { messagesDB.deleteThreadMessages(threadId) } +fun Context.moveConversationToRecycleBin(threadId: Long) { + conversationsDB.archiveConversation( + ArchivedConversation( + threadId = threadId, + deletedTs = System.currentTimeMillis() + ) + ) +} + fun Context.deleteMessage(id: Long, isMMS: Boolean) { val uri = if (isMMS) Mms.CONTENT_URI else Sms.CONTENT_URI val selection = "${Sms._ID} = ?" 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..a08c1466 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt @@ -91,4 +91,12 @@ class Config(context: Context) : BaseConfig(context) { var keyboardHeight: Int get() = prefs.getInt(SOFT_KEYBOARD_HEIGHT, context.getDefaultKeyboardHeight()) set(keyboardHeight) = prefs.edit().putInt(SOFT_KEYBOARD_HEIGHT, keyboardHeight).apply() + + var useArchive: Boolean + get() = prefs.getBoolean(USE_ARCHIVE, true) + set(useArchive) = prefs.edit().putBoolean(USE_ARCHIVE, useArchive).apply() + + var lastArchiveCheck: Long + get() = prefs.getLong(LAST_ARCHIVE_CHECK, 0L) + set(lastArchiveCheck) = prefs.edit().putLong(LAST_ARCHIVE_CHECK, lastArchiveCheck).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..dcc3e3f7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -37,6 +37,8 @@ const val SCHEDULED_MESSAGE_ID = "scheduled_message_id" const val SOFT_KEYBOARD_HEIGHT = "soft_keyboard_height" const val IS_MMS = "is_mms" const val MESSAGE_ID = "message_id" +const val USE_ARCHIVE = "use_recycle_bin" +const val LAST_ARCHIVE_CHECK = "last_bin_check" private const val PATH = "com.simplemobiletools.smsmessenger.action." const val MARK_AS_READ = PATH + "mark_as_read" diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt index 0c8db25c..7c321f82 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt @@ -1,9 +1,7 @@ package com.simplemobiletools.smsmessenger.interfaces -import androidx.room.Dao -import androidx.room.Insert -import androidx.room.OnConflictStrategy -import androidx.room.Query +import androidx.room.* +import com.simplemobiletools.smsmessenger.models.ArchivedConversation import com.simplemobiletools.smsmessenger.models.Conversation @Dao @@ -11,8 +9,20 @@ interface ConversationsDao { @Insert(onConflict = OnConflictStrategy.REPLACE) fun insertOrUpdate(conversation: Conversation): Long - @Query("SELECT * FROM conversations") - fun getAll(): List + @Query("SELECT conversations.* FROM conversations LEFT OUTER JOIN archived_conversations ON conversations.thread_id = archived_conversations.thread_id WHERE archived_conversations.deleted_ts is NULL") + fun getNonArchived(): List + + @Query("SELECT conversations.* FROM archived_conversations INNER JOIN conversations ON conversations.thread_id = archived_conversations.thread_id") + fun getAllArchived(): List + + @Query("SELECT COUNT(*) FROM archived_conversations") + fun getArchivedCount(): Int + + @Query("SELECT * FROM archived_conversations WHERE deleted_ts < :timestamp") + fun getOldArchived(timestamp: Long): List + + @Insert(onConflict = OnConflictStrategy.REPLACE) + fun archiveConversation(archivedConversation: ArchivedConversation) @Query("SELECT * FROM conversations WHERE thread_id = :threadId") fun getConversationWithThreadId(threadId: Long): Conversation? @@ -30,5 +40,14 @@ interface ConversationsDao { fun markUnread(threadId: Long) @Query("DELETE FROM conversations WHERE thread_id = :threadId") - fun deleteThreadId(threadId: Long) + fun deleteThreadFromConversations(threadId: Long) + + @Query("DELETE FROM archived_conversations WHERE thread_id = :threadId") + fun deleteThreadFromArchivedConversations(threadId: Long) + + @Transaction + fun deleteThreadId(threadId: Long) { + deleteThreadFromConversations(threadId) + deleteThreadFromArchivedConversations(threadId) + } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/ArchivedConversation.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/ArchivedConversation.kt new file mode 100644 index 00000000..bcf43692 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/ArchivedConversation.kt @@ -0,0 +1,15 @@ +package com.simplemobiletools.smsmessenger.models + +import androidx.room.ColumnInfo +import androidx.room.Entity +import androidx.room.Index +import androidx.room.PrimaryKey + +@Entity( + tableName = "archived_conversations", + indices = [(Index(value = ["thread_id"], unique = true))] +) +data class ArchivedConversation( + @PrimaryKey @ColumnInfo(name = "thread_id") var threadId: Long, + @ColumnInfo(name = "deleted_ts") var deletedTs: Long +) 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..2b0fb852 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -100,6 +100,7 @@ class SmsReceiver : BroadcastReceiver() { subscriptionId ) context.messagesDB.insertOrUpdate(message) + context.conversationsDB.deleteThreadFromArchivedConversations(threadId) refreshMessages() context.showReceivedMessageNotification(newMessageId, address, body, threadId, bitmap) } diff --git a/app/src/main/res/layout/activity_archived_conversations.xml b/app/src/main/res/layout/activity_archived_conversations.xml new file mode 100644 index 00000000..d699f386 --- /dev/null +++ b/app/src/main/res/layout/activity_archived_conversations.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 99dfaa9b..eb7cef7a 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -346,6 +346,55 @@ android:id="@+id/settings_outgoing_messages_divider" layout="@layout/divider" /> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/archive_menu.xml b/app/src/main/res/menu/archive_menu.xml new file mode 100644 index 00000000..a3f11163 --- /dev/null +++ b/app/src/main/res/menu/archive_menu.xml @@ -0,0 +1,11 @@ + + + + diff --git a/app/src/main/res/menu/cab_archived_conversations.xml b/app/src/main/res/menu/cab_archived_conversations.xml new file mode 100644 index 00000000..19adebc2 --- /dev/null +++ b/app/src/main/res/menu/cab_archived_conversations.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index d60f5871..b403927f 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -13,6 +13,11 @@ android:showAsAction="never" android:title="@string/export_messages" app:showAsAction="never" /> + Date: Wed, 12 Jul 2023 10:37:20 +0200 Subject: [PATCH 02/19] Add proper strings for archive operations --- app/src/main/AndroidManifest.xml | 2 +- .../ArchivedConversationsActivity.kt | 9 +++-- .../activities/SettingsActivity.kt | 34 +++++++++---------- .../smsmessenger/activities/ThreadActivity.kt | 7 +++- .../adapters/ArchivedConversationsAdapter.kt | 2 +- .../adapters/ConversationsAdapter.kt | 6 +++- .../dialogs/DeleteConfirmationDialog.kt | 8 ++--- .../smsmessenger/extensions/Context.kt | 2 +- .../smsmessenger/helpers/Constants.kt | 4 +-- .../activity_archived_conversations.xml | 4 +-- app/src/main/res/layout/activity_settings.xml | 22 ++++++------ .../res/layout/dialog_delete_confirmation.xml | 6 ++-- app/src/main/res/menu/archive_menu.xml | 2 +- .../res/menu/cab_archived_conversations.xml | 2 +- app/src/main/res/values-ar/strings.xml | 15 +++++++- app/src/main/res/values-az/strings.xml | 13 +++++++ app/src/main/res/values-be/strings.xml | 13 +++++++ app/src/main/res/values-bg/strings.xml | 13 +++++++ app/src/main/res/values-ca/strings.xml | 15 +++++++- app/src/main/res/values-cr/strings.xml | 13 +++++++ app/src/main/res/values-cs/strings.xml | 15 +++++++- app/src/main/res/values-da/strings.xml | 13 +++++++ app/src/main/res/values-de/strings.xml | 15 +++++++- app/src/main/res/values-el/strings.xml | 13 +++++++ app/src/main/res/values-eo/strings.xml | 13 +++++++ app/src/main/res/values-es/strings.xml | 15 +++++++- app/src/main/res/values-et/strings.xml | 15 +++++++- app/src/main/res/values-fi/strings.xml | 15 +++++++- app/src/main/res/values-fr/strings.xml | 15 +++++++- app/src/main/res/values-gl/strings.xml | 15 +++++++- app/src/main/res/values-hi/strings.xml | 13 +++++++ app/src/main/res/values-hr/strings.xml | 15 +++++++- app/src/main/res/values-hu/strings.xml | 13 +++++++ app/src/main/res/values-in/strings.xml | 13 +++++++ app/src/main/res/values-is/strings.xml | 13 +++++++ app/src/main/res/values-it/strings.xml | 15 +++++++- app/src/main/res/values-iw/strings.xml | 13 +++++++ app/src/main/res/values-ja/strings.xml | 13 +++++++ app/src/main/res/values-lt/strings.xml | 13 +++++++ app/src/main/res/values-lv/strings.xml | 13 +++++++ app/src/main/res/values-mk/strings.xml | 13 +++++++ app/src/main/res/values-ml/strings.xml | 13 +++++++ app/src/main/res/values-nb-rNO/strings.xml | 15 +++++++- app/src/main/res/values-nl/strings.xml | 15 +++++++- app/src/main/res/values-pa-rPK/strings.xml | 13 +++++++ app/src/main/res/values-pl/strings.xml | 15 +++++++- app/src/main/res/values-pt-rBR/strings.xml | 15 +++++++- app/src/main/res/values-pt/strings.xml | 15 +++++++- app/src/main/res/values-ro/strings.xml | 13 +++++++ app/src/main/res/values-ru/strings.xml | 15 +++++++- app/src/main/res/values-sk/strings.xml | 13 +++++++ app/src/main/res/values-sl/strings.xml | 13 +++++++ app/src/main/res/values-sr/strings.xml | 13 +++++++ app/src/main/res/values-sv/strings.xml | 15 +++++++- app/src/main/res/values-ta/strings.xml | 13 +++++++ app/src/main/res/values-th/strings.xml | 13 +++++++ app/src/main/res/values-tr/strings.xml | 15 +++++++- app/src/main/res/values-uk/strings.xml | 15 +++++++- app/src/main/res/values-zh-rCN/strings.xml | 15 +++++++- app/src/main/res/values-zh-rTW/strings.xml | 13 +++++++ app/src/main/res/values/strings.xml | 13 +++++++ 61 files changed, 693 insertions(+), 70 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c94576e3..98286d61 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -55,7 +55,7 @@ android:name=".activities.ArchivedConversationsActivity" android:configChanges="orientation" android:exported="true" - android:label="Archived Conversations" + android:label="@string/archived_conversations" android:parentActivityName=".activities.MainActivity" /> + val confirmationMessage = if (config.useArchive) { + R.string.archive_whole_conversation_confirmation + } else { + R.string.delete_whole_conversation_confirmation + } + DeleteConfirmationDialog(this, getString(confirmationMessage), config.useArchive) { skipRecycleBin -> ensureBackgroundThread { if (skipRecycleBin || config.useArchive.not()) { deleteConversation(threadId) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt index b1050197..4febe62b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt @@ -38,7 +38,7 @@ class ArchivedConversationsAdapter( val baseString = R.string.deletion_confirmation val question = String.format(resources.getString(baseString), items) - DeleteConfirmationDialog(activity, question, showSkipRecycleBinOption = false) { _ -> + DeleteConfirmationDialog(activity, question, showSkipArchiveOption = false) { _ -> ensureBackgroundThread { deleteConversations() } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt index 1b79472b..0b7e463d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt @@ -118,7 +118,11 @@ class ConversationsAdapter( val itemsCnt = selectedKeys.size val items = resources.getQuantityString(R.plurals.delete_conversations, itemsCnt, itemsCnt) - val baseString = R.string.deletion_confirmation + val baseString = if (activity.config.useArchive) { + R.string.archive_confirmation + } else { + R.string.deletion_confirmation + } val question = String.format(resources.getString(baseString), items) DeleteConfirmationDialog(activity, question, activity.config.useArchive) { skipRecycleBin -> diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt index f72a7513..328e9191 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt @@ -7,12 +7,12 @@ import com.simplemobiletools.commons.extensions.getAlertDialogBuilder import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.smsmessenger.R import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.delete_remember_title -import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.skip_the_recycle_bin_checkbox +import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.skip_the_archive_checkbox class DeleteConfirmationDialog( private val activity: Activity, private val message: String, - private val showSkipRecycleBinOption: Boolean, + private val showSkipArchiveOption: Boolean, private val callback: (skipRecycleBin: Boolean) -> Unit ) { @@ -21,7 +21,7 @@ class DeleteConfirmationDialog( init { view.delete_remember_title.text = message - view.skip_the_recycle_bin_checkbox.beGoneIf(!showSkipRecycleBinOption) + view.skip_the_archive_checkbox.beGoneIf(!showSkipArchiveOption) activity.getAlertDialogBuilder() .setPositiveButton(R.string.yes) { _, _ -> dialogConfirmed() } .setNegativeButton(R.string.no, null) @@ -34,6 +34,6 @@ class DeleteConfirmationDialog( private fun dialogConfirmed() { dialog?.dismiss() - callback(view.skip_the_recycle_bin_checkbox.isChecked) + callback(view.skip_the_archive_checkbox.isChecked) } } 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 f9228f8e..375b037a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -602,7 +602,7 @@ fun Context.removeAllArchivedConversations(callback: (() -> Unit)? = null) { for (conversation in conversationsDB.getAllArchived()) { deleteConversation(conversation.threadId) } - toast(R.string.recycle_bin_emptied) + toast(R.string.archive_emptied_successfully) callback?.invoke() } catch (e: Exception) { toast(R.string.unknown_error_occurred) 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 dcc3e3f7..c025d1bf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -37,8 +37,8 @@ const val SCHEDULED_MESSAGE_ID = "scheduled_message_id" const val SOFT_KEYBOARD_HEIGHT = "soft_keyboard_height" const val IS_MMS = "is_mms" const val MESSAGE_ID = "message_id" -const val USE_ARCHIVE = "use_recycle_bin" -const val LAST_ARCHIVE_CHECK = "last_bin_check" +const val USE_ARCHIVE = "use_archive" +const val LAST_ARCHIVE_CHECK = "last_archive_check" private const val PATH = "com.simplemobiletools.smsmessenger.action." const val MARK_AS_READ = PATH + "mark_as_read" diff --git a/app/src/main/res/layout/activity_archived_conversations.xml b/app/src/main/res/layout/activity_archived_conversations.xml index d699f386..615dc677 100644 --- a/app/src/main/res/layout/activity_archived_conversations.xml +++ b/app/src/main/res/layout/activity_archived_conversations.xml @@ -11,7 +11,7 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="@color/color_primary" - app:title="Archived messages" + app:title="@string/archived_conversations" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index eb7cef7a..3ae36231 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -347,52 +347,52 @@ layout="@layout/divider" /> + android:text="@string/archived_conversations" /> + android:text="@string/archive_instead_of_delete" /> + android:text="@string/empty_archive" /> + android:text="@string/skip_archive" /> diff --git a/app/src/main/res/menu/archive_menu.xml b/app/src/main/res/menu/archive_menu.xml index a3f11163..b9339951 100644 --- a/app/src/main/res/menu/archive_menu.xml +++ b/app/src/main/res/menu/archive_menu.xml @@ -6,6 +6,6 @@ diff --git a/app/src/main/res/menu/cab_archived_conversations.xml b/app/src/main/res/menu/cab_archived_conversations.xml index 19adebc2..395d170c 100644 --- a/app/src/main/res/menu/cab_archived_conversations.xml +++ b/app/src/main/res/menu/cab_archived_conversations.xml @@ -17,6 +17,6 @@ diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 9c2555fc..d6b9d53d 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -56,8 +56,21 @@ ضع إشارة مقروء وضع علامة كغير مقروءة Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. هل أنت متأكد أنك تريد حذف كافة رسائل هذه المحادثة؟ + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? محادثة %d @@ -119,4 +132,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..d145ebf6 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 80dabae2..8d0bd612 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -54,8 +54,21 @@ Прачытана Не прачытана Я + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Выдаліць усе паведамленні ў гэтай размове\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d размову diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 50d6c913..0be5a864 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -52,8 +52,21 @@ Отбележи като прочетено Отбележи като непрочетено Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Сигурни ли сте, че искате да изтриете всички съобщения от този разговор\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d разговор diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 18e938e5..af8aa836 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -52,8 +52,21 @@ Marca com a llegit Marcar com no llegit Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Confirmeu que voleu suprimir tots els missatges d\'aquesta conversa\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversa @@ -107,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-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 669639ec..d145ebf6 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 56ee7077..7fd137a5 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -53,8 +53,21 @@ Označit jako přečtené Označit jako nepřečtené + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Opravdu chcete smazat všechny zprávy v této konverzaci\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d konverzace @@ -110,4 +123,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..6c022b32 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -52,8 +52,21 @@ Marker som læst Marker som ulæst Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på, at du vil slette alle beskeder i denne samtale\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d samtale diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index dd571c63..49dabb7f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -52,8 +52,21 @@ Als gelesen markieren Als ungelesen markieren Ich + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sollen wirklich alle Nachrichten dieser Unterhaltung gelöscht werden\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d Unterhaltung @@ -107,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-el/strings.xml b/app/src/main/res/values-el/strings.xml index 5e613921..6d83f37e 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -52,8 +52,21 @@ Σήμανση ως Αναγνωσμένο Σήμανση ως Μη Αναγνωσμένο Εγώ + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Είστε βέβαιοι ότι θέλετε να διαγράψετε όλα τα μηνύματα αυτής της συνομιλίας; + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d συνομιλία diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 1f3ce244..67e47d6f 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -52,8 +52,21 @@ Marki kiel legitan Marki kiel nelegitan Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d konversacio diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f4b25568..84496008 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -53,8 +53,21 @@ Marcar como leído Marcar como no leído Yo + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. ¿Estás seguro que quieres eliminar todos los mensajes en esta conversación\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversación @@ -110,4 +123,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..62b7157f 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -52,8 +52,21 @@ Märgi loetuks Märgi mitteloetuks Mina + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Kas oled kindel, et soovid kustutada kõik selle vestluse sõnumid\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d vestlus @@ -107,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-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 5912ef49..411239bf 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -52,8 +52,21 @@ Merkitse luetuksi Merkitse lukemattomaksi Minä + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Haluatko varmasti poistaa kaikki tämän keskustelun viestit\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d keskustelu @@ -107,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-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 361ffcd5..6b9bd695 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -53,8 +53,21 @@ Marquer comme lu Marquer comme non lu Moi + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Voulez-vous vraiment supprimer tous les messages de cette conversation \? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation @@ -110,4 +123,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..d3725a39 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -52,8 +52,21 @@ Marcar como lida Marcar como non lida Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ten a certeza de que desexa eliminar todas as mensaxes desta conversa\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversa @@ -107,4 +120,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..d145ebf6 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 4adf51bd..3234ae1a 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -53,8 +53,21 @@ Označi kao pročitano Označi kao nepročitano Ja + + Vrati iz arhiva + Izbriši sve arhivirane razgovore + Prekoči arhiv, obriši razgovore odmah + Arhivirani razgovori + Arhiviraj + Nema arhiviranih razgovora + Arhiviraj razgovore umjesto brisanja + Arhiv je prazan + Arhiv je uspješno ispražnjen + Jeste li ste sigurni da želite isprazniti arhiv? Svi arhivirani razgovori će biti obrisani. Stvarno želiš izbrisati sve poruke ovog razgovora\? + Stvarno želiš arhivirati ovaj razgovor? + Jeste li ste sigurni da želite arhivirati %s? %d razgovor @@ -110,4 +123,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..28777748 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -52,8 +52,21 @@ Megjelölés olvasottként Megjelölés olvasatlanként Nekem + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Biztos, hogy törli az összes üzenetet ebből a beszélgetésből\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d beszélgetést diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index dd1e2656..c9335f4f 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -51,8 +51,21 @@ Tandai sebagai Dibaca Tandai sebagai Belum dibaca Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Apakah Anda yakin ingin menghapus semua pesan dari percakapan ini\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d percakapan diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 5b0d3463..a8329c8c 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f7e8ea3a..d68d476a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -53,8 +53,21 @@ Letto Non letto Io + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Vuoi davvero eliminare tutti i messaggi di questa conversazione\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversazione @@ -110,4 +123,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..cedac9f9 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -54,8 +54,21 @@ סמן כנקרא סמן כלא נקרא אני + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. האם אתה בטוח שברצונך למחוק את כל ההודעות של השיחה הזו\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? שיחה %d diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index b9a84b7b..94d389eb 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -51,8 +51,21 @@ 既読にする 未読にする 自分 + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. 本当にこの会話のすべてのメッセージを削除しますか? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d 件の会話 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 3d01d8c4..9c48de33 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -52,8 +52,21 @@ Nauja žinutė Pažymėti kaip perskaitytą Pažymėti kaip neskaitytą + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ar tikrai norite ištrinti visas šio pokalbio žinutes\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d pokalbis diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 76c5d375..4adf9e31 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -53,8 +53,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 669639ec..d145ebf6 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index c78c857a..cbc4a970 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -52,8 +52,21 @@ വായിച്ചതായി അടയാളപ്പെടുത്തുക വായിച്ചിട്ടില്ലെന്ന് അടയാളപ്പെടുത്തുക Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. ഈ സംഭാഷണത്തിലെ എല്ലാ സന്ദേശങ്ങളും ഇല്ലാതാക്കണമെന്ന് തീർച്ചയാണോ\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d സംഭാഷണം diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 9157790c..93cdcbd7 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -52,8 +52,21 @@ Marker som lest Marker som ulest Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på at du vil slette alle meldinger fra denne konversasjonen\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d konversasjon @@ -107,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-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 44f2cf5d..fe78fbaf 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -52,8 +52,21 @@ Als gelezen markeren Als ongelezen markeren Ik + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Alle berichten in dit gesprek verwijderen\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d gesprek @@ -107,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-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 46584fdf..d6780709 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -52,8 +52,21 @@ پرھے وجوں چنھت کرو نا پڑھے وجوں چنھت کرو میں + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. تسیں پکے اے، سارے سنیہے مٹاؤ؟ + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 8d26cff7..0c710baa 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -54,8 +54,21 @@ Oznacz jako przeczytane Oznacz jako nieprzeczytane Ja + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Czy usunąć wszystkie wiadomości z tej rozmowy\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d rozmowę @@ -113,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-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 372f162d..3dcc7233 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -53,8 +53,21 @@ Marcar como Lida Marcar como Não Lida Eu + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem certeza que quer deletar todas as mensagens dessa conversa\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversa @@ -110,4 +123,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..8ee92149 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -53,8 +53,21 @@ Marcar como lida Marcar como não lida Eu + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem a certeza de que pretende apagar todas as mensagens desta conversa\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversa @@ -110,4 +123,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..f839ed76 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -53,8 +53,21 @@ Marchează ca citit Marchează ca necitit Eu + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sunteți sigur că doriți să ștergeți toate mesajele din această conversație\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversaţie diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3371657d..ed19d4ca 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -54,8 +54,21 @@ Прочитано Не прочитано Я + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Удалить все сообщения в этой переписке\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d переписку @@ -113,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-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index b2f9477e..52308a12 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -53,8 +53,21 @@ Označiť ako prečítané Označiť ako neprečítané Ja + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste si istý, že chcete odstrániť všetky správy tejto konverzácie\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d konverzáciu diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index bc55f5fc..af9a3d7e 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -54,8 +54,21 @@ Označi kot prebrano Označi kot neprebrano Jaz + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste prepričani, da želite izbrisati vsa sporočila tega pogovora\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d pogovor diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 771e9cc0..6a5bebe8 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -53,8 +53,21 @@ Означи као прочитано Означи као непрочитанo Ja + + Врати из архиве + Обриши све архивиране конверзације + Прескочи архиву, обриши конверзације директно + Архивиране конверзације + Архивирај + Нема архивираних разговора + Архивирај конверзације умјесто брисанја + Архива је празна + Архива је успјешно испражнјена + Да ли сте сигурни да желите да испразните архиву? Све архивиране поруке ће бити избрисане. Да ли сте сигурни да желите да избришете све поруке ове конверзације\? + Да ли сте сигурни да желите да архивирате ову конверзацију? + Да ли сте сигурни да желите да архивирате %s? %d разговор diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 5a722d79..ba55fb1e 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -52,8 +52,21 @@ Markera som läst Markera som oläst Jag + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Är du säker på att du vill ta bort alla meddelanden i konversationen\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d konversation @@ -107,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-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 1029c6d4..d82dfc4f 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -52,8 +52,21 @@ படித்ததாக குறியிடு படிக்காததாக குறியிடு Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. இந்த உரையாடலின் அனைத்து செய்திகளையும் நிச்சயமாக நீக்க விரும்புகிறீர்களா\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d உரையாடல் diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 9a1916d2..8727660a 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -51,8 +51,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 650aa34a..01ee2dc1 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -52,8 +52,21 @@ Okundu olarak işaretle Okunmadı olarak işaretle Ben + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Bu görüşmenin tüm mesajlarını silmek istediğinizden emin misiniz\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d görüşme @@ -107,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-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 734c22a2..681b8453 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -54,8 +54,21 @@ Прочитано Не прочитано Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Справді видалити всі повідомлення у цьому листуванні\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d листування @@ -113,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-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 6a035913..0b7da87e 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -51,8 +51,21 @@ 标记为已读 标记为未读 自己 + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您确定要删除此对话的所有消息吗\? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d 个对话 @@ -104,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-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 012d4194..c77cab72 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -51,8 +51,21 @@ 標為已讀 標為未讀 Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您確定要刪除此對話中的所有訊息嗎? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0e2a271f..1d899384 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -52,8 +52,21 @@ Mark as Read Mark as Unread Me + + Unarchive + Remove all archived conversations + Skip the archive, delete conversations directly + Archived conversations + Archive + No archived conversations have been found + Archive conversations instead of deleting + The archive is empty + The archive has been emptied successfully + Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation? + Are you sure you want to archive this conversation? + Are you sure you want to archive %s? %d conversation From 4b3fa422be321d79c7ec592ebf0814092b1b884b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 12:32:28 +0200 Subject: [PATCH 03/19] Move Show archived conversations to strings.xml --- app/src/main/res/menu/menu_main.xml | 2 +- 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 + 48 files changed, 48 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index b403927f..df0aeea0 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -16,7 +16,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index d145ebf6..eece8b3f 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 8d0bd612..bd2aa348 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 0be5a864..2a4c381d 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index af8aa836..9aaceb20 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index d145ebf6..eece8b3f 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 7fd137a5..8b004ca9 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 6c022b32..09e435ec 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 49dabb7f..f0d72e22 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 6d83f37e..8e14fde3 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 67e47d6f..58dbf609 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 84496008..e0271e52 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 62b7157f..537c79ea 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 411239bf..cb8f8b65 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 6b9bd695..04be21c2 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index d3725a39..b488f8a6 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index d145ebf6..eece8b3f 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 3234ae1a..1051e075 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -58,6 +58,7 @@ Izbriši sve arhivirane razgovore Prekoči arhiv, obriši razgovore odmah Arhivirani razgovori + Prikaži arhivirane razgovore Arhiviraj Nema arhiviranih razgovora Arhiviraj razgovore umjesto brisanja diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 28777748..138ae36e 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index c9335f4f..8e579333 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -56,6 +56,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index a8329c8c..a0bb907d 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d68d476a..15525d8b 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index cedac9f9..7e246028 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 94d389eb..ac986c54 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -56,6 +56,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 9c48de33..4c84f92d 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 4adf9e31..134007a3 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index d145ebf6..eece8b3f 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index cbc4a970..32c5570a 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 93cdcbd7..85c16723 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index fe78fbaf..cf1cb86a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index d6780709..c06a36c8 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0c710baa..f2caca79 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 3dcc7233..df1899c2 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 8ee92149..7599769c 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index f839ed76..4f0e97b6 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index ed19d4ca..5f47c772 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 52308a12..c54b4607 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -58,6 +58,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index af9a3d7e..8f09b55d 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 6a5bebe8..2e2b9d70 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -58,6 +58,7 @@ Обриши све архивиране конверзације Прескочи архиву, обриши конверзације директно Архивиране конверзације + Прикажи архивиране конверзације Архивирај Нема архивираних разговора Архивирај конверзације умјесто брисанја diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index ba55fb1e..3929d65f 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index d82dfc4f..b03f8d53 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 8727660a..6523256f 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -56,6 +56,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 01ee2dc1..561d9d76 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 681b8453..77a8fca8 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -59,6 +59,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 0b7da87e..f6958a4f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -56,6 +56,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c77cab72..0317947b 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -56,6 +56,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1d899384..53c7a988 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -57,6 +57,7 @@ Remove all archived conversations Skip the archive, delete conversations directly Archived conversations + Show archived conversations Archive No archived conversations have been found Archive conversations instead of deleting From c51dc0b935390ab2d19f40bfc219d469a6fda71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 13 Jul 2023 10:33:02 +0200 Subject: [PATCH 04/19] Fix archived_conversations creation migration --- .../smsmessenger/databases/MessagesDatabase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 db698255..c2899671 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -117,7 +117,7 @@ abstract class MessagesDatabase : RoomDatabase() { private val MIGRATION_7_8 = object : Migration(7, 8) { override fun migrate(database: SupportSQLiteDatabase) { database.apply { - execSQL("CREATE TABLE archived_conversations (`thread_id` INTEGER NOT NULL PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)") + execSQL("CREATE TABLE IF NOT EXISTS archived_conversations (`thread_id` INTEGER NOT NULL PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)") } } } From 1b7874446b22f865b61eaf2602ea66740609bce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 13 Jul 2023 13:52:54 +0200 Subject: [PATCH 05/19] Add index to db migration for archived_conversations --- .../simplemobiletools/smsmessenger/databases/MessagesDatabase.kt | 1 + 1 file changed, 1 insertion(+) 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 c2899671..3c962c3c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -118,6 +118,7 @@ abstract class MessagesDatabase : RoomDatabase() { override fun migrate(database: SupportSQLiteDatabase) { database.apply { execSQL("CREATE TABLE IF NOT EXISTS archived_conversations (`thread_id` INTEGER NOT NULL PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)") + execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_archived_conversations_thread_id` ON `archived_conversations` (`thread_id`)") } } } From c1446194a1aefe9a94a4b7529a1fa184b2d01dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 13 Jul 2023 16:37:32 +0200 Subject: [PATCH 06/19] Change archived conversations section label to archive --- 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 7f645c98..962e1b20 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -60,7 +60,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index eece8b3f..9dffb06f 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index bd2aa348..5e3329a9 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 2a4c381d..bd8dc30e 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 9aaceb20..6a46a1ed 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index eece8b3f..9dffb06f 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 8b004ca9..807cc198 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 09e435ec..11a76867 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index f0d72e22..5cd930f9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 8e14fde3..417a31fb 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 58dbf609..224d2d3c 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e0271e52..fac0ba29 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 537c79ea..20cbf975 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index cb8f8b65..7af8aabf 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 04be21c2..8b21c321 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index b488f8a6..19112f5e 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index eece8b3f..9dffb06f 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 1051e075..d2ff6d85 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -57,7 +57,7 @@ Vrati iz arhiva Izbriši sve arhivirane razgovore Prekoči arhiv, obriši razgovore odmah - Arhivirani razgovori + Arhiv Prikaži arhivirane razgovore Arhiviraj Nema arhiviranih razgovora diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 138ae36e..062b77ef 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 8e579333..fdfdead3 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -55,7 +55,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index a0bb907d..406a1971 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 15525d8b..9c89a653 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 7e246028..0f32d53b 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ac986c54..7f9d3ac4 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -55,7 +55,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 4c84f92d..b4d368df 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 134007a3..a95a452e 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index eece8b3f..9dffb06f 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 32c5570a..c8511934 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 85c16723..ec28a6ef 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index cf1cb86a..4e3a69ec 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index c06a36c8..1f0af8dd 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index f2caca79..a65c022c 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index df1899c2..3fa9961d 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 7599769c..1e846f70 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 4f0e97b6..ed856ea6 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5f47c772..8081d70f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index c54b4607..20a7efd5 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -57,7 +57,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 8f09b55d..209e8dd6 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 2e2b9d70..1d57fa12 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -57,7 +57,7 @@ Врати из архиве Обриши све архивиране конверзације Прескочи архиву, обриши конверзације директно - Архивиране конверзације + Архива Прикажи архивиране конверзације Архивирај Нема архивираних разговора diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 3929d65f..ba5c5318 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index b03f8d53..d194966d 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 6523256f..ad705429 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -55,7 +55,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 561d9d76..89bbebc1 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 77a8fca8..7512e647 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -58,7 +58,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index f6958a4f..bf4b7f0f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -55,7 +55,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0317947b..63e78579 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -55,7 +55,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 53c7a988..97f3e3a9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -56,7 +56,7 @@ Unarchive Remove all archived conversations Skip the archive, delete conversations directly - Archived conversations + Archive Show archived conversations Archive No archived conversations have been found From 4d13fa1079422fb7b8f87b45ca2c56f1cf224c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 13 Jul 2023 16:38:09 +0200 Subject: [PATCH 07/19] Disable archive by default --- .../kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a08c1466..d38489ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt @@ -93,7 +93,7 @@ class Config(context: Context) : BaseConfig(context) { set(keyboardHeight) = prefs.edit().putInt(SOFT_KEYBOARD_HEIGHT, keyboardHeight).apply() var useArchive: Boolean - get() = prefs.getBoolean(USE_ARCHIVE, true) + get() = prefs.getBoolean(USE_ARCHIVE, false) set(useArchive) = prefs.edit().putBoolean(USE_ARCHIVE, useArchive).apply() var lastArchiveCheck: Long From 857a4f0b937f030359c207dd4b8281328c208a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 17 Jul 2023 16:43:31 +0200 Subject: [PATCH 08/19] Implement archive functionality using system API --- .../smsmessenger/activities/MainActivity.kt | 1 - .../activities/SettingsActivity.kt | 43 ---------------- .../smsmessenger/activities/ThreadActivity.kt | 41 +++++++++++----- .../adapters/ArchivedConversationsAdapter.kt | 8 +-- .../adapters/ConversationsAdapter.kt | 46 ++++++++++++----- .../databases/MessagesDatabase.kt | 5 +- .../dialogs/DeleteConfirmationDialog.kt | 39 --------------- .../smsmessenger/extensions/Context.kt | 44 +++++++---------- .../interfaces/ConversationsDao.kt | 31 ++++-------- .../smsmessenger/models/Conversation.kt | 3 +- .../smsmessenger/receivers/SmsReceiver.kt | 2 +- .../main/res/drawable/ic_archive_vector.xml | 3 ++ .../main/res/drawable/ic_unarchive_vector.xml | 3 ++ app/src/main/res/layout/activity_settings.xml | 49 ------------------- .../res/menu/cab_archived_conversations.xml | 11 +++-- app/src/main/res/menu/cab_conversations.xml | 6 +++ app/src/main/res/menu/menu_thread.xml | 10 ++++ 17 files changed, 127 insertions(+), 218 deletions(-) delete mode 100644 app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt create mode 100644 app/src/main/res/drawable/ic_archive_vector.xml create mode 100644 app/src/main/res/drawable/ic_unarchive_vector.xml 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 119b357b..9608a6f8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -64,7 +64,6 @@ class MainActivity : SimpleActivity() { updateMaterialActivityViews(main_coordinator, conversations_list, useTransparentNavigation = true, useTopSearchMenu = true) if (savedInstanceState == null) { - checkAndDeleteOldArchivedConversations() handleAppPasswordProtection { wasProtectionHandled = it if (it) { 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 35bbccb4..d97e67d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt @@ -11,15 +11,12 @@ import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.extensions.config -import com.simplemobiletools.smsmessenger.extensions.conversationsDB -import com.simplemobiletools.smsmessenger.extensions.removeAllArchivedConversations import com.simplemobiletools.smsmessenger.helpers.* import kotlinx.android.synthetic.main.activity_settings.* import java.util.* class SettingsActivity : SimpleActivity() { private var blockedNumbersAtPause = -1 - private var archiveConversations = 0 override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true @@ -50,8 +47,6 @@ class SettingsActivity : SimpleActivity() { setupGroupMessageAsMMS() setupLockScreenVisibility() setupMMSFileSizeLimit() - setupUseRecycleBin() - setupEmptyRecycleBin() setupAppPasswordProtection() updateTextColors(settings_nested_scrollview) @@ -64,7 +59,6 @@ class SettingsActivity : SimpleActivity() { settings_general_settings_label, settings_outgoing_messages_label, settings_notifications_label, - settings_archive_label, settings_security_label ).forEach { it.setTextColor(getProperPrimaryColor()) @@ -250,43 +244,6 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupUseRecycleBin() { - updateRecycleBinButtons() - settings_use_archive.isChecked = config.useArchive - settings_use_archive_holder.setOnClickListener { - settings_use_archive.toggle() - config.useArchive = settings_use_archive.isChecked - updateRecycleBinButtons() - } - } - - private fun updateRecycleBinButtons() { - settings_empty_archive_holder.beVisibleIf(config.useArchive) - } - - private fun setupEmptyRecycleBin() { - ensureBackgroundThread { - archiveConversations = conversationsDB.getArchivedCount() - runOnUiThread { - settings_empty_archive_size.text = - resources.getQuantityString(R.plurals.delete_conversations, archiveConversations, archiveConversations) - } - } - - settings_empty_archive_holder.setOnClickListener { - if (archiveConversations == 0) { - toast(R.string.archive_is_empty) - } else { - ConfirmationDialog(this, "", R.string.empty_archive_confirmation, R.string.yes, R.string.no) { - removeAllArchivedConversations() - archiveConversations = 0 - settings_empty_archive_size.text = - resources.getQuantityString(R.plurals.delete_conversations, archiveConversations, archiveConversations) - } - } - } - } - private fun setupAppPasswordProtection() { settings_app_password_protection.isChecked = config.isAppPasswordProtectionOn settings_app_password_protection_holder.setOnClickListener { 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 73b0f5c6..5e78974e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -55,7 +55,6 @@ import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.adapters.AttachmentsAdapter import com.simplemobiletools.smsmessenger.adapters.AutoCompleteTextViewAdapter import com.simplemobiletools.smsmessenger.adapters.ThreadAdapter -import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog import com.simplemobiletools.smsmessenger.dialogs.InvalidNumberDialog import com.simplemobiletools.smsmessenger.dialogs.RenameConversationDialog import com.simplemobiletools.smsmessenger.dialogs.ScheduleMessageDialog @@ -245,6 +244,8 @@ class ThreadActivity : SimpleActivity() { val firstPhoneNumber = participants.firstOrNull()?.phoneNumbers?.firstOrNull()?.value thread_toolbar.menu.apply { findItem(R.id.delete).isVisible = threadItems.isNotEmpty() + findItem(R.id.archive).isVisible = threadItems.isNotEmpty() && conversation?.isArchived == false + findItem(R.id.unarchive).isVisible = threadItems.isNotEmpty() && conversation?.isArchived == true findItem(R.id.rename_conversation).isVisible = participants.size > 1 && conversation != null findItem(R.id.conversation_details).isVisible = conversation != null findItem(R.id.block_number).title = addLockedLabelIfNeeded(R.string.block_number) @@ -269,6 +270,8 @@ class ThreadActivity : SimpleActivity() { when (menuItem.itemId) { R.id.block_number -> tryBlocking() R.id.delete -> askConfirmDelete() + R.id.archive -> archiveConversation() + R.id.unarchive -> unarchiveConversation() R.id.rename_conversation -> renameConversation() R.id.conversation_details -> showConversationDetails() R.id.add_number_to_contact -> addNumberToContact() @@ -889,18 +892,10 @@ class ThreadActivity : SimpleActivity() { } private fun askConfirmDelete() { - val confirmationMessage = if (config.useArchive) { - R.string.archive_whole_conversation_confirmation - } else { - R.string.delete_whole_conversation_confirmation - } - DeleteConfirmationDialog(this, getString(confirmationMessage), config.useArchive) { skipRecycleBin -> + val confirmationMessage = R.string.delete_whole_conversation_confirmation + ConfirmationDialog(this, getString(confirmationMessage)) { ensureBackgroundThread { - if (skipRecycleBin || config.useArchive.not()) { - deleteConversation(threadId) - } else { - moveConversationToRecycleBin(threadId) - } + deleteConversation(threadId) runOnUiThread { refreshMessages() finish() @@ -909,6 +904,26 @@ class ThreadActivity : SimpleActivity() { } } + private fun archiveConversation() { + ensureBackgroundThread { + updateConversationArchivedStatus(threadId, true) + runOnUiThread { + refreshMessages() + finish() + } + } + } + + private fun unarchiveConversation() { + ensureBackgroundThread { + updateConversationArchivedStatus(threadId, false) + runOnUiThread { + refreshMessages() + finish() + } + } + } + private fun dialNumber() { val phoneNumber = participants.first().phoneNumbers.first().normalizedNumber dialNumber(phoneNumber) @@ -1337,7 +1352,7 @@ class ThreadActivity : SimpleActivity() { } } messagesDB.insertOrUpdate(message) - conversationsDB.deleteThreadFromArchivedConversations(message.threadId) + updateConversationArchivedStatus(message.threadId, false) } // show selected contacts, properly split to new lines when appropriate diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt index 4febe62b..1ca22c72 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt @@ -1,14 +1,14 @@ package com.simplemobiletools.smsmessenger.adapters import android.view.Menu +import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.notificationManager import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity -import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog -import com.simplemobiletools.smsmessenger.extensions.conversationsDB import com.simplemobiletools.smsmessenger.extensions.deleteConversation +import com.simplemobiletools.smsmessenger.extensions.updateConversationArchivedStatus import com.simplemobiletools.smsmessenger.helpers.refreshMessages import com.simplemobiletools.smsmessenger.models.Conversation @@ -38,7 +38,7 @@ class ArchivedConversationsAdapter( val baseString = R.string.deletion_confirmation val question = String.format(resources.getString(baseString), items) - DeleteConfirmationDialog(activity, question, showSkipArchiveOption = false) { _ -> + ConfirmationDialog(activity, question) { ensureBackgroundThread { deleteConversations() } @@ -66,7 +66,7 @@ class ArchivedConversationsAdapter( val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList conversationsToUnarchive.forEach { - activity.conversationsDB.deleteThreadFromArchivedConversations(it.threadId) + activity.updateConversationArchivedStatus(it.threadId, false) } removeConversationsFromList(conversationsToUnarchive) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt index 0b7e463d..221b880b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt @@ -12,7 +12,6 @@ import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.activities.SimpleActivity -import com.simplemobiletools.smsmessenger.dialogs.DeleteConfirmationDialog import com.simplemobiletools.smsmessenger.dialogs.RenameConversationDialog import com.simplemobiletools.smsmessenger.extensions.* import com.simplemobiletools.smsmessenger.helpers.refreshMessages @@ -54,6 +53,7 @@ class ConversationsAdapter( R.id.cab_dial_number -> dialNumber() R.id.cab_copy_number -> copyNumberToClipboard() R.id.cab_delete -> askConfirmDelete() + R.id.cab_archive -> ensureBackgroundThread { archiveConversations() } R.id.cab_rename_conversation -> renameConversation(getSelectedItems().first()) R.id.cab_mark_as_read -> markAsRead() R.id.cab_mark_as_unread -> markAsUnread() @@ -118,32 +118,54 @@ class ConversationsAdapter( val itemsCnt = selectedKeys.size val items = resources.getQuantityString(R.plurals.delete_conversations, itemsCnt, itemsCnt) - val baseString = if (activity.config.useArchive) { - R.string.archive_confirmation - } else { - R.string.deletion_confirmation - } + val baseString = R.string.deletion_confirmation val question = String.format(resources.getString(baseString), items) - DeleteConfirmationDialog(activity, question, activity.config.useArchive) { skipRecycleBin -> + ConfirmationDialog(activity, question) { ensureBackgroundThread { - deleteConversations(skipRecycleBin) + deleteConversations() } } } - private fun deleteConversations(skipRecycleBin: Boolean) { + private fun archiveConversations() { if (selectedKeys.isEmpty()) { return } val conversationsToRemove = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList conversationsToRemove.forEach { - if (skipRecycleBin || activity.config.useArchive.not()) { - activity.deleteConversation(it.threadId) + activity.updateConversationArchivedStatus(it.threadId, true) + activity.notificationManager.cancel(it.threadId.hashCode()) + } + + val newList = try { + currentList.toMutableList().apply { removeAll(conversationsToRemove) } + } catch (ignored: Exception) { + currentList.toMutableList() + } + + activity.runOnUiThread { + if (newList.none { selectedKeys.contains(it.hashCode()) }) { + refreshMessages() + finishActMode() } else { - activity.moveConversationToRecycleBin(it.threadId) + submitList(newList) + if (newList.isEmpty()) { + refreshMessages() + } } + } + } + + private fun deleteConversations() { + if (selectedKeys.isEmpty()) { + return + } + + val conversationsToRemove = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList + conversationsToRemove.forEach { + activity.deleteConversation(it.threadId) activity.notificationManager.cancel(it.threadId.hashCode()) } 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 3c962c3c..25d29328 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/databases/MessagesDatabase.kt @@ -14,7 +14,7 @@ import com.simplemobiletools.smsmessenger.interfaces.MessageAttachmentsDao import com.simplemobiletools.smsmessenger.interfaces.MessagesDao import com.simplemobiletools.smsmessenger.models.* -@Database(entities = [Conversation::class, ArchivedConversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 8) +@Database(entities = [Conversation::class, Attachment::class, MessageAttachment::class, Message::class], version = 8) @TypeConverters(Converters::class) abstract class MessagesDatabase : RoomDatabase() { @@ -117,8 +117,7 @@ abstract class MessagesDatabase : RoomDatabase() { private val MIGRATION_7_8 = object : Migration(7, 8) { override fun migrate(database: SupportSQLiteDatabase) { database.apply { - execSQL("CREATE TABLE IF NOT EXISTS archived_conversations (`thread_id` INTEGER NOT NULL PRIMARY KEY, `deleted_ts` INTEGER NOT NULL)") - execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_archived_conversations_thread_id` ON `archived_conversations` (`thread_id`)") + execSQL("ALTER TABLE conversations ADD COLUMN archived INTEGER NOT NULL DEFAULT 0") } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt deleted file mode 100644 index 328e9191..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/dialogs/DeleteConfirmationDialog.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.simplemobiletools.smsmessenger.dialogs - -import android.app.Activity -import androidx.appcompat.app.AlertDialog -import com.simplemobiletools.commons.extensions.beGoneIf -import com.simplemobiletools.commons.extensions.getAlertDialogBuilder -import com.simplemobiletools.commons.extensions.setupDialogStuff -import com.simplemobiletools.smsmessenger.R -import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.delete_remember_title -import kotlinx.android.synthetic.main.dialog_delete_confirmation.view.skip_the_archive_checkbox - -class DeleteConfirmationDialog( - private val activity: Activity, - private val message: String, - private val showSkipArchiveOption: Boolean, - private val callback: (skipRecycleBin: Boolean) -> Unit -) { - - private var dialog: AlertDialog? = null - val view = activity.layoutInflater.inflate(R.layout.dialog_delete_confirmation, null)!! - - init { - view.delete_remember_title.text = message - view.skip_the_archive_checkbox.beGoneIf(!showSkipArchiveOption) - activity.getAlertDialogBuilder() - .setPositiveButton(R.string.yes) { _, _ -> dialogConfirmed() } - .setNegativeButton(R.string.no, null) - .apply { - activity.setupDialogStuff(view, this) { alertDialog -> - dialog = alertDialog - } - } - } - - private fun dialogConfirmed() { - dialog?.dismiss() - callback(view.skip_the_archive_checkbox.isChecked) - } -} 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 375b037a..fb2deffa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -238,7 +238,8 @@ fun Context.getConversations(threadId: Long? = null, privateContacts: ArrayList< Threads.SNIPPET, Threads.DATE, Threads.READ, - Threads.RECIPIENT_IDS + Threads.RECIPIENT_IDS, + Threads.ARCHIVED ) var selection = "${Threads.MESSAGE_COUNT} > ?" @@ -277,7 +278,8 @@ fun Context.getConversations(threadId: Long? = null, privateContacts: ArrayList< val photoUri = if (phoneNumbers.size == 1) simpleContactHelper.getPhotoUriFromPhoneNumber(phoneNumbers.first()) else "" val isGroupConversation = phoneNumbers.size > 1 val read = cursor.getIntValue(Threads.READ) == 1 - val conversation = Conversation(id, snippet, date.toInt(), read, title, photoUri, isGroupConversation, phoneNumbers.first()) + val archived = cursor.getIntValue(Threads.ARCHIVED) == 1 + val conversation = Conversation(id, snippet, date.toInt(), read, title, photoUri, isGroupConversation, phoneNumbers.first(), isArchived = archived) conversations.add(conversation) } @@ -581,21 +583,6 @@ fun Context.insertNewSMS(address: String, subject: String, body: String, date: L } } -fun Context.checkAndDeleteOldArchivedConversations(callback: (() -> Unit)? = null) { - if (config.useArchive && config.lastArchiveCheck < System.currentTimeMillis() - DAY_SECONDS * 1000) { - config.lastArchiveCheck = System.currentTimeMillis() - ensureBackgroundThread { - try { - for (conversation in conversationsDB.getOldArchived(System.currentTimeMillis() - MONTH_SECONDS * 1000L)) { - deleteConversation(conversation.threadId) - } - callback?.invoke() - } catch (e: Exception) { - } - } - } -} - fun Context.removeAllArchivedConversations(callback: (() -> Unit)? = null) { ensureBackgroundThread { try { @@ -631,13 +618,19 @@ fun Context.deleteConversation(threadId: Long) { messagesDB.deleteThreadMessages(threadId) } -fun Context.moveConversationToRecycleBin(threadId: Long) { - conversationsDB.archiveConversation( - ArchivedConversation( - threadId = threadId, - deletedTs = System.currentTimeMillis() - ) - ) +fun Context.updateConversationArchivedStatus(threadId: Long, archived: Boolean) { + val uri = Threads.CONTENT_URI + val values = ContentValues().apply { + put(Threads.ARCHIVED, archived) + } + val selection = "${Threads._ID} = ?" + val selectionArgs = arrayOf(threadId.toString()) + contentResolver.update(uri, values, selection, selectionArgs) + if (archived) { + conversationsDB.moveToArchive(threadId) + } else { + conversationsDB.unarchive(threadId) + } } fun Context.deleteMessage(id: Long, isMMS: Boolean) { @@ -968,7 +961,8 @@ fun Context.createTemporaryThread(message: Message, threadId: Long = generateRan isGroupConversation = addresses.size > 1, phoneNumber = addresses.first(), isScheduled = true, - usesCustomTitle = cachedConv?.usesCustomTitle == true + usesCustomTitle = cachedConv?.usesCustomTitle == true, + isArchived = false ) try { conversationsDB.insertOrUpdate(conversation) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt index 7c321f82..43b502ad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/interfaces/ConversationsDao.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.smsmessenger.interfaces import androidx.room.* -import com.simplemobiletools.smsmessenger.models.ArchivedConversation import com.simplemobiletools.smsmessenger.models.Conversation @Dao @@ -9,21 +8,12 @@ interface ConversationsDao { @Insert(onConflict = OnConflictStrategy.REPLACE) fun insertOrUpdate(conversation: Conversation): Long - @Query("SELECT conversations.* FROM conversations LEFT OUTER JOIN archived_conversations ON conversations.thread_id = archived_conversations.thread_id WHERE archived_conversations.deleted_ts is NULL") + @Query("SELECT * FROM conversations WHERE archived = 0") fun getNonArchived(): List - @Query("SELECT conversations.* FROM archived_conversations INNER JOIN conversations ON conversations.thread_id = archived_conversations.thread_id") + @Query("SELECT * FROM conversations WHERE archived = 1") fun getAllArchived(): List - @Query("SELECT COUNT(*) FROM archived_conversations") - fun getArchivedCount(): Int - - @Query("SELECT * FROM archived_conversations WHERE deleted_ts < :timestamp") - fun getOldArchived(timestamp: Long): List - - @Insert(onConflict = OnConflictStrategy.REPLACE) - fun archiveConversation(archivedConversation: ArchivedConversation) - @Query("SELECT * FROM conversations WHERE thread_id = :threadId") fun getConversationWithThreadId(threadId: Long): Conversation? @@ -39,15 +29,12 @@ interface ConversationsDao { @Query("UPDATE conversations SET read = 0 WHERE thread_id = :threadId") fun markUnread(threadId: Long) + @Query("UPDATE conversations SET archived = 1 WHERE thread_id = :threadId") + fun moveToArchive(threadId: Long) + + @Query("UPDATE conversations SET archived = 0 WHERE thread_id = :threadId") + fun unarchive(threadId: Long) + @Query("DELETE FROM conversations WHERE thread_id = :threadId") - fun deleteThreadFromConversations(threadId: Long) - - @Query("DELETE FROM archived_conversations WHERE thread_id = :threadId") - fun deleteThreadFromArchivedConversations(threadId: Long) - - @Transaction - fun deleteThreadId(threadId: Long) { - deleteThreadFromConversations(threadId) - deleteThreadFromArchivedConversations(threadId) - } + fun deleteThreadId(threadId: Long) } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Conversation.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Conversation.kt index c20d376c..b56d3d4f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Conversation.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/Conversation.kt @@ -16,7 +16,8 @@ data class Conversation( @ColumnInfo(name = "is_group_conversation") var isGroupConversation: Boolean, @ColumnInfo(name = "phone_number") var phoneNumber: String, @ColumnInfo(name = "is_scheduled") var isScheduled: Boolean = false, - @ColumnInfo(name = "uses_custom_title") var usesCustomTitle: Boolean = false + @ColumnInfo(name = "uses_custom_title") var usesCustomTitle: Boolean = false, + @ColumnInfo(name = "archived") var isArchived: Boolean = false ) { companion object { 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 2b0fb852..e7af670c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt @@ -100,7 +100,7 @@ class SmsReceiver : BroadcastReceiver() { subscriptionId ) context.messagesDB.insertOrUpdate(message) - context.conversationsDB.deleteThreadFromArchivedConversations(threadId) + context.updateConversationArchivedStatus(threadId, false) refreshMessages() context.showReceivedMessageNotification(newMessageId, address, body, threadId, bitmap) } diff --git a/app/src/main/res/drawable/ic_archive_vector.xml b/app/src/main/res/drawable/ic_archive_vector.xml new file mode 100644 index 00000000..0617d995 --- /dev/null +++ b/app/src/main/res/drawable/ic_archive_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_unarchive_vector.xml b/app/src/main/res/drawable/ic_unarchive_vector.xml new file mode 100644 index 00000000..f4a3b76e --- /dev/null +++ b/app/src/main/res/drawable/ic_unarchive_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 3ae36231..99dfaa9b 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -346,55 +346,6 @@ android:id="@+id/settings_outgoing_messages_divider" layout="@layout/divider" /> - - - - - - - - - - - - - - - - - - + - diff --git a/app/src/main/res/menu/cab_conversations.xml b/app/src/main/res/menu/cab_conversations.xml index 9044cd72..c341082d 100644 --- a/app/src/main/res/menu/cab_conversations.xml +++ b/app/src/main/res/menu/cab_conversations.xml @@ -26,6 +26,12 @@ android:icon="@drawable/ic_minus_circle_vector" android:title="@string/block_number" app:showAsAction="ifRoom" /> + + + Date: Tue, 18 Jul 2023 08:21:22 +0200 Subject: [PATCH 09/19] Remove unused strings --- .../res/layout/dialog_delete_confirmation.xml | 26 ------------------- app/src/main/res/values-ar/strings.xml | 5 ---- app/src/main/res/values-az/strings.xml | 5 ---- app/src/main/res/values-be/strings.xml | 5 ---- app/src/main/res/values-bg/strings.xml | 5 ---- app/src/main/res/values-ca/strings.xml | 5 ---- app/src/main/res/values-cr/strings.xml | 5 ---- app/src/main/res/values-cs/strings.xml | 5 ---- app/src/main/res/values-da/strings.xml | 5 ---- app/src/main/res/values-de/strings.xml | 5 ---- app/src/main/res/values-el/strings.xml | 5 ---- app/src/main/res/values-eo/strings.xml | 5 ---- app/src/main/res/values-es/strings.xml | 5 ---- app/src/main/res/values-et/strings.xml | 5 ---- app/src/main/res/values-fi/strings.xml | 5 ---- app/src/main/res/values-fr/strings.xml | 5 ---- app/src/main/res/values-gl/strings.xml | 5 ---- app/src/main/res/values-hi/strings.xml | 5 ---- app/src/main/res/values-hr/strings.xml | 5 ---- app/src/main/res/values-hu/strings.xml | 5 ---- app/src/main/res/values-in/strings.xml | 5 ---- app/src/main/res/values-is/strings.xml | 5 ---- app/src/main/res/values-it/strings.xml | 5 ---- app/src/main/res/values-iw/strings.xml | 5 ---- app/src/main/res/values-ja/strings.xml | 5 ---- app/src/main/res/values-lt/strings.xml | 5 ---- app/src/main/res/values-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 | 5 ---- app/src/main/res/values-nl/strings.xml | 5 ---- app/src/main/res/values-pa-rPK/strings.xml | 5 ---- app/src/main/res/values-pl/strings.xml | 5 ---- app/src/main/res/values-pt-rBR/strings.xml | 5 ---- app/src/main/res/values-pt/strings.xml | 5 ---- app/src/main/res/values-ro/strings.xml | 5 ---- app/src/main/res/values-ru/strings.xml | 5 ---- app/src/main/res/values-sk/strings.xml | 5 ---- app/src/main/res/values-sl/strings.xml | 5 ---- app/src/main/res/values-sr/strings.xml | 5 ---- app/src/main/res/values-sv/strings.xml | 5 ---- app/src/main/res/values-ta/strings.xml | 5 ---- app/src/main/res/values-th/strings.xml | 5 ---- app/src/main/res/values-tr/strings.xml | 5 ---- app/src/main/res/values-uk/strings.xml | 5 ---- app/src/main/res/values-zh-rCN/strings.xml | 5 ---- app/src/main/res/values-zh-rTW/strings.xml | 5 ---- app/src/main/res/values/strings.xml | 5 ---- 48 files changed, 261 deletions(-) delete mode 100644 app/src/main/res/layout/dialog_delete_confirmation.xml diff --git a/app/src/main/res/layout/dialog_delete_confirmation.xml b/app/src/main/res/layout/dialog_delete_confirmation.xml deleted file mode 100644 index 4c7af316..00000000 --- a/app/src/main/res/layout/dialog_delete_confirmation.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 962e1b20..da39a093 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -59,19 +59,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. هل أنت متأكد أنك تريد حذف كافة رسائل هذه المحادثة؟ - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? محادثة %d diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 9dffb06f..baae62fa 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 5e3329a9..ec716674 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Выдаліць усе паведамленні ў гэтай размове\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d размову diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index bd8dc30e..56888a75 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Сигурни ли сте, че искате да изтриете всички съобщения от този разговор\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d разговор diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 6a46a1ed..6aae4bf5 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Confirmeu que voleu suprimir tots els missatges d\'aquesta conversa\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index 9dffb06f..baae62fa 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 807cc198..1e2cc871 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Opravdu chcete smazat všechny zprávy v této konverzaci\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d konverzace diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 11a76867..f0bf14a8 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på, at du vil slette alle beskeder i denne samtale\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d samtale diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5cd930f9..09c07e16 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sollen wirklich alle Nachrichten dieser Unterhaltung gelöscht werden\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d Unterhaltung diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 417a31fb..36c3a5ba 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Είστε βέβαιοι ότι θέλετε να διαγράψετε όλα τα μηνύματα αυτής της συνομιλίας; - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d συνομιλία diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 224d2d3c..8fa801eb 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d konversacio diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index fac0ba29..91a189be 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. ¿Estás seguro que quieres eliminar todos los mensajes en esta conversación\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversación diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 20cbf975..a2bb14b4 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Kas oled kindel, et soovid kustutada kõik selle vestluse sõnumid\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d vestlus diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 7af8aabf..5d2c0ef8 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Haluatko varmasti poistaa kaikki tämän keskustelun viestit\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d keskustelu diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 8b21c321..55dac3d4 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Voulez-vous vraiment supprimer tous les messages de cette conversation \? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 19112f5e..03e87794 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ten a certeza de que desexa eliminar todas as mensaxes desta conversa\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 9dffb06f..baae62fa 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index d2ff6d85..fd554454 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -56,19 +56,14 @@ Vrati iz arhiva Izbriši sve arhivirane razgovore - Prekoči arhiv, obriši razgovore odmah Arhiv Prikaži arhivirane razgovore Arhiviraj Nema arhiviranih razgovora - Arhiviraj razgovore umjesto brisanja - Arhiv je prazan Arhiv je uspješno ispražnjen Jeste li ste sigurni da želite isprazniti arhiv? Svi arhivirani razgovori će biti obrisani. Stvarno želiš izbrisati sve poruke ovog razgovora\? - Stvarno želiš arhivirati ovaj razgovor? - Jeste li ste sigurni da želite arhivirati %s? %d razgovor diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 062b77ef..44d34d56 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Biztos, hogy törli az összes üzenetet ebből a beszélgetésből\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d beszélgetést diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index fdfdead3..da8bb913 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -54,19 +54,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Apakah Anda yakin ingin menghapus semua pesan dari percakapan ini\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d percakapan diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 406a1971..2db10180 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 9c89a653..42da574c 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Vuoi davvero eliminare tutti i messaggi di questa conversazione\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversazione diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 0f32d53b..701108d5 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. האם אתה בטוח שברצונך למחוק את כל ההודעות של השיחה הזו\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? שיחה %d diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 7f9d3ac4..365b47a4 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -54,19 +54,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. 本当にこの会話のすべてのメッセージを削除しますか? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d 件の会話 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index b4d368df..f76377a2 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ar tikrai norite ištrinti visas šio pokalbio žinutes\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d pokalbis diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index a95a452e..735e595f 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 9dffb06f..baae62fa 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index c8511934..fc3b43c3 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. ഈ സംഭാഷണത്തിലെ എല്ലാ സന്ദേശങ്ങളും ഇല്ലാതാക്കണമെന്ന് തീർച്ചയാണോ\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d സംഭാഷണം diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index ec28a6ef..68572e90 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på at du vil slette alle meldinger fra denne konversasjonen\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d konversasjon diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 4e3a69ec..a1a20ed7 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Alle berichten in dit gesprek verwijderen\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d gesprek diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 1f0af8dd..ca2a41b3 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. تسیں پکے اے، سارے سنیہے مٹاؤ؟ - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index a65c022c..e6de244b 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Czy usunąć wszystkie wiadomości z tej rozmowy\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d rozmowę diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 3fa9961d..2a2fb614 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem certeza que quer deletar todas as mensagens dessa conversa\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 1e846f70..46173b8d 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem a certeza de que pretende apagar todas as mensagens desta conversa\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index ed856ea6..73cfad5b 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sunteți sigur că doriți să ștergeți toate mesajele din această conversație\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversaţie diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 8081d70f..b2508f78 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Удалить все сообщения в этой переписке\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d переписку diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 20a7efd5..b7f42d58 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -56,19 +56,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste si istý, že chcete odstrániť všetky správy tejto konverzácie\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d konverzáciu diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 209e8dd6..aff3970a 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste prepričani, da želite izbrisati vsa sporočila tega pogovora\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d pogovor diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 1d57fa12..5895b9cd 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -56,19 +56,14 @@ Врати из архиве Обриши све архивиране конверзације - Прескочи архиву, обриши конверзације директно Архива Прикажи архивиране конверзације Архивирај Нема архивираних разговора - Архивирај конверзације умјесто брисанја - Архива је празна Архива је успјешно испражнјена Да ли сте сигурни да желите да испразните архиву? Све архивиране поруке ће бити избрисане. Да ли сте сигурни да желите да избришете све поруке ове конверзације\? - Да ли сте сигурни да желите да архивирате ову конверзацију? - Да ли сте сигурни да желите да архивирате %s? %d разговор diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index ba5c5318..2e9ad962 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Är du säker på att du vill ta bort alla meddelanden i konversationen\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d konversation diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index d194966d..38b4a596 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. இந்த உரையாடலின் அனைத்து செய்திகளையும் நிச்சயமாக நீக்க விரும்புகிறீர்களா\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d உரையாடல் diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index ad705429..a188d02b 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -54,19 +54,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 89bbebc1..0a556625 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Bu görüşmenin tüm mesajlarını silmek istediğinizden emin misiniz\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d görüşme diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 7512e647..e2f567ab 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -57,19 +57,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Справді видалити всі повідомлення у цьому листуванні\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d листування diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index bf4b7f0f..0e2efd6b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -54,19 +54,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您确定要删除此对话的所有消息吗\? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d 个对话 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 63e78579..416b2177 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -54,19 +54,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您確定要刪除此對話中的所有訊息嗎? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 97f3e3a9..0017f34d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -55,19 +55,14 @@ Unarchive Remove all archived conversations - Skip the archive, delete conversations directly Archive Show archived conversations Archive No archived conversations have been found - Archive conversations instead of deleting - The archive is empty The archive has been emptied successfully Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation? - Are you sure you want to archive this conversation? - Are you sure you want to archive %s? %d conversation From f6b5bbf455cbdd14b1e8a63da3693c253fdebcdd Mon Sep 17 00:00:00 2001 From: Wilson Date: Sat, 15 Jul 2023 18:13:16 -0400 Subject: [PATCH 10/19] add asking for Exact alarm permission before scheduling a message above Android API S --- app/build.gradle | 2 +- .../smsmessenger/activities/MainActivity.kt | 5 ++- .../smsmessenger/activities/ThreadActivity.kt | 35 ++++++++++++++++--- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 08e4e769..c40a46f9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:b4cc381943' + implementation 'com.github.SimpleMobileTools:Simple-Commons:57a5db1ef3' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:5657799572' 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 5c6a1b5b..d0708a55 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -251,7 +251,10 @@ class MainActivity : SimpleActivity() { handlePermission(PERMISSION_READ_CONTACTS) { handleNotificationPermission { granted -> if (!granted) { - PermissionRequiredDialog(this, R.string.allow_notifications_incoming_messages) + PermissionRequiredDialog( + activity = this, + textId = R.string.allow_notifications_incoming_messages, + positiveActionCallback = { openNotificationSettings() }) } } 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..068ed917 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.smsmessenger.activities import android.annotation.SuppressLint import android.app.Activity +import android.app.AlarmManager import android.content.ActivityNotFoundException import android.content.Intent import android.content.res.ColorStateList @@ -9,9 +10,11 @@ import android.graphics.BitmapFactory import android.graphics.drawable.LayerDrawable import android.media.MediaMetadataRetriever import android.net.Uri +import android.os.Build import android.os.Bundle import android.provider.ContactsContract import android.provider.MediaStore +import android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM import android.provider.Telephony import android.provider.Telephony.Sms.MESSAGE_TYPE_QUEUED import android.provider.Telephony.Sms.STATUS_NONE @@ -44,6 +47,7 @@ import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.FeatureLockedDialog +import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* @@ -51,6 +55,7 @@ import com.simplemobiletools.commons.models.PhoneNumber import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.SimpleContact import com.simplemobiletools.commons.views.MyRecyclerView +import com.simplemobiletools.smsmessenger.BuildConfig import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.adapters.AttachmentsAdapter import com.simplemobiletools.smsmessenger.adapters.AutoCompleteTextViewAdapter @@ -75,6 +80,7 @@ import org.joda.time.DateTime import java.io.File import java.io.InputStream import java.io.OutputStream +import java.security.acl.Permission class ThreadActivity : SimpleActivity() { private val MIN_DATE_TIME_DIFF_SECS = 300 @@ -710,6 +716,25 @@ class ThreadActivity : SimpleActivity() { setupScheduleSendUi() } + private fun askForExactAlarmPermissionIfNeeded(callback: () -> Unit = {}) { + if (isSPlus()) { + val alarmManager: AlarmManager = getSystemService(ALARM_SERVICE) as AlarmManager + if (alarmManager.canScheduleExactAlarms()) { + callback() + } else { + PermissionRequiredDialog( + activity = this, + textId = R.string.allow_alarm_scheduled_messages, + positiveActionCallback = { + openRequestExactAlarmSettings(BuildConfig.APPLICATION_ID) + }, + ) + } + } else { + callback() + } + } + private fun setupAttachmentSizes() { messages.filter { it.attachment != null }.forEach { message -> message.attachment!!.attachments.forEach { @@ -1529,10 +1554,12 @@ class ThreadActivity : SimpleActivity() { } private fun launchScheduleSendDialog(originalDateTime: DateTime? = null) { - ScheduleMessageDialog(this, originalDateTime) { newDateTime -> - if (newDateTime != null) { - scheduledDateTime = newDateTime - showScheduleMessageDialog() + askForExactAlarmPermissionIfNeeded { + ScheduleMessageDialog(this, originalDateTime) { newDateTime -> + if (newDateTime != null) { + scheduledDateTime = newDateTime + showScheduleMessageDialog() + } } } } From b9b85ea6a7209dab3ac161bf8d445a3e0c51d262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 10:07:33 +0200 Subject: [PATCH 11/19] Remove options menu on ArchivedConversationsActivity when there are no conversations --- .../activities/ArchivedConversationsActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ArchivedConversationsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ArchivedConversationsActivity.kt index fd023379..27b52fe3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ArchivedConversationsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ArchivedConversationsActivity.kt @@ -58,6 +58,12 @@ class ArchivedConversationsActivity : SimpleActivity() { } } + private fun updateOptionsMenu(conversations: ArrayList) { + archive_toolbar.menu.apply { + findItem(R.id.empty_archive).isVisible = conversations.isNotEmpty() + } + } + private fun updateMenuColors() { updateStatusbarColor(getProperBackgroundColor()) } @@ -116,6 +122,7 @@ class ArchivedConversationsActivity : SimpleActivity() { ).toMutableList() as ArrayList showOrHidePlaceholder(conversations.isEmpty()) + updateOptionsMenu(conversations) try { getOrCreateConversationsAdapter().apply { From 5dff8367e3d80ff96f149e318e76f8ee2b5e89ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 10:08:18 +0200 Subject: [PATCH 12/19] Update label for archive emptying for clarity --- 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-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-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 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index da39a093..014b560f 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -58,7 +58,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index baae62fa..e4f94483 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index ec716674..8eba6699 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -56,7 +56,7 @@ Я Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 56888a75..d59bd6f7 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 6aae4bf5..1577800c 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index baae62fa..e4f94483 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 1e2cc871..65f6a049 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -55,7 +55,7 @@ Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index f0bf14a8..1220d3f7 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 09c07e16..a91d324c 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -54,7 +54,7 @@ Ich Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 36c3a5ba..99b83b92 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -54,7 +54,7 @@ Εγώ Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 8fa801eb..9997e0db 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 91a189be..222094b6 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -55,7 +55,7 @@ Yo Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index a2bb14b4..c352e64a 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -54,7 +54,7 @@ Mina Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 5d2c0ef8..7807d9d4 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -54,7 +54,7 @@ Minä Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 55dac3d4..64112d9e 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -55,7 +55,7 @@ Moi Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 03e87794..35133396 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index baae62fa..e4f94483 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 44d34d56..a31657cb 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -54,7 +54,7 @@ Nekem Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index da8bb913..b328eb3f 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -53,7 +53,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 2db10180..fb81093a 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 42da574c..1780dad8 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -55,7 +55,7 @@ Io Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 701108d5..0b12ea3e 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -56,7 +56,7 @@ אני Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 365b47a4..750bdb79 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -53,7 +53,7 @@ 自分 Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index f76377a2..c721e78e 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -54,7 +54,7 @@ Pažymėti kaip neskaitytą Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 735e595f..8fe17965 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -55,7 +55,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index baae62fa..e4f94483 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index fc3b43c3..af9420b3 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 68572e90..fe36e675 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index a1a20ed7..66d5cbcb 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -54,7 +54,7 @@ Ik Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index ca2a41b3..b4283234 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -54,7 +54,7 @@ میں Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index e6de244b..883a87f2 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -56,7 +56,7 @@ Ja Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 2a2fb614..b2334994 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -55,7 +55,7 @@ Eu Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 46173b8d..240fd5a5 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -55,7 +55,7 @@ Eu Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 73cfad5b..c754db19 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -55,7 +55,7 @@ Eu Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index b2508f78..d1bda9c2 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -56,7 +56,7 @@ Я Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index b7f42d58..71f57846 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -55,7 +55,7 @@ Ja Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index aff3970a..d3eae2a4 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -56,7 +56,7 @@ Jaz Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 2e9ad962..60504a20 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -54,7 +54,7 @@ Jag Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 38b4a596..a644be2d 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index a188d02b..77189473 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -53,7 +53,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 0a556625..3bb075db 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -54,7 +54,7 @@ Ben Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e2f567ab..17c26134 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -56,7 +56,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 0e2efd6b..27666a77 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -53,7 +53,7 @@ 自己 Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 416b2177..19517dec 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -53,7 +53,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0017f34d..0e44a98b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -54,7 +54,7 @@ Me Unarchive - Remove all archived conversations + Delete all archived conversations Archive Show archived conversations Archive From e07fbe40a6bf042109fddc78ceda6fb8ab906879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 10:11:52 +0200 Subject: [PATCH 13/19] Add confirmation for archiving conversations --- .../adapters/ConversationsAdapter.kt | 16 +++++++++++++++- 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 + 48 files changed, 62 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt index 221b880b..79abd34a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ConversationsAdapter.kt @@ -53,7 +53,7 @@ class ConversationsAdapter( R.id.cab_dial_number -> dialNumber() R.id.cab_copy_number -> copyNumberToClipboard() R.id.cab_delete -> askConfirmDelete() - R.id.cab_archive -> ensureBackgroundThread { archiveConversations() } + R.id.cab_archive -> askConfirmArchive() R.id.cab_rename_conversation -> renameConversation(getSelectedItems().first()) R.id.cab_mark_as_read -> markAsRead() R.id.cab_mark_as_unread -> markAsUnread() @@ -128,6 +128,20 @@ class ConversationsAdapter( } } + private fun askConfirmArchive() { + val itemsCnt = selectedKeys.size + val items = resources.getQuantityString(R.plurals.delete_conversations, itemsCnt, itemsCnt) + + val baseString = R.string.archive_confirmation + val question = String.format(resources.getString(baseString), items) + + ConfirmationDialog(activity, question) { + ensureBackgroundThread { + archiveConversations() + } + } + } + private fun archiveConversations() { if (selectedKeys.isEmpty()) { return diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 014b560f..645b10b9 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -67,6 +67,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. هل أنت متأكد أنك تريد حذف كافة رسائل هذه المحادثة؟ + Are you sure you want to archive %s? محادثة %d diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index e4f94483..07734ff0 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 8eba6699..876d99f2 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Выдаліць усе паведамленні ў гэтай размове\? + Are you sure you want to archive %s? %d размову diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index d59bd6f7..cdd4a0a5 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Сигурни ли сте, че искате да изтриете всички съобщения от този разговор\? + Are you sure you want to archive %s? %d разговор diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 1577800c..bd5697cc 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Confirmeu que voleu suprimir tots els missatges d\'aquesta conversa\? + Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-cr/strings.xml b/app/src/main/res/values-cr/strings.xml index e4f94483..07734ff0 100644 --- a/app/src/main/res/values-cr/strings.xml +++ b/app/src/main/res/values-cr/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 65f6a049..ffc97caa 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Opravdu chcete smazat všechny zprávy v této konverzaci\? + Are you sure you want to archive %s? %d konverzace diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 1220d3f7..b989066d 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på, at du vil slette alle beskeder i denne samtale\? + Are you sure you want to archive %s? %d samtale diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index a91d324c..3cadbbeb 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sollen wirklich alle Nachrichten dieser Unterhaltung gelöscht werden\? + Are you sure you want to archive %s? %d Unterhaltung diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 99b83b92..a4c5f1a2 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Είστε βέβαιοι ότι θέλετε να διαγράψετε όλα τα μηνύματα αυτής της συνομιλίας; + Are you sure you want to archive %s? %d συνομιλία diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 9997e0db..d7a4a49f 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d konversacio diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 222094b6..f1de2c3c 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. ¿Estás seguro que quieres eliminar todos los mensajes en esta conversación\? + Are you sure you want to archive %s? %d conversación diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index c352e64a..09152186 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Kas oled kindel, et soovid kustutada kõik selle vestluse sõnumid\? + Are you sure you want to archive %s? %d vestlus diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 7807d9d4..0f5abfc3 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Haluatko varmasti poistaa kaikki tämän keskustelun viestit\? + Are you sure you want to archive %s? %d keskustelu diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 64112d9e..50b95200 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Voulez-vous vraiment supprimer tous les messages de cette conversation \? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 35133396..59e6b406 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ten a certeza de que desexa eliminar todas as mensaxes desta conversa\? + Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index e4f94483..07734ff0 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index fd554454..38ddf7b4 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -64,6 +64,7 @@ Jeste li ste sigurni da želite isprazniti arhiv? Svi arhivirani razgovori će biti obrisani. Stvarno želiš izbrisati sve poruke ovog razgovora\? + Are you sure you want to archive %s? %d razgovor diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index a31657cb..6932a061 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Biztos, hogy törli az összes üzenetet ebből a beszélgetésből\? + Are you sure you want to archive %s? %d beszélgetést diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index b328eb3f..14b33e4e 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -62,6 +62,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Apakah Anda yakin ingin menghapus semua pesan dari percakapan ini\? + Are you sure you want to archive %s? %d percakapan diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index fb81093a..4ad4f164 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 1780dad8..508890be 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Vuoi davvero eliminare tutti i messaggi di questa conversazione\? + Are you sure you want to archive %s? %d conversazione diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 0b12ea3e..468ed2e3 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. האם אתה בטוח שברצונך למחוק את כל ההודעות של השיחה הזו\? + Are you sure you want to archive %s? שיחה %d diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 750bdb79..eac3c746 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -62,6 +62,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. 本当にこの会話のすべてのメッセージを削除しますか? + Are you sure you want to archive %s? %d 件の会話 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index c721e78e..6b2c7e77 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ar tikrai norite ištrinti visas šio pokalbio žinutes\? + Are you sure you want to archive %s? %d pokalbis diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 8fe17965..b245141c 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index e4f94483..07734ff0 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index af9420b3..772375cd 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. ഈ സംഭാഷണത്തിലെ എല്ലാ സന്ദേശങ്ങളും ഇല്ലാതാക്കണമെന്ന് തീർച്ചയാണോ\? + Are you sure you want to archive %s? %d സംഭാഷണം diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index fe36e675..307f790e 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Er du sikker på at du vil slette alle meldinger fra denne konversasjonen\? + Are you sure you want to archive %s? %d konversasjon diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 66d5cbcb..cc7da4ad 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Alle berichten in dit gesprek verwijderen\? + Are you sure you want to archive %s? %d gesprek diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index b4283234..e1628056 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. تسیں پکے اے، سارے سنیہے مٹاؤ؟ + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 883a87f2..e049fe65 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Czy usunąć wszystkie wiadomości z tej rozmowy\? + Are you sure you want to archive %s? %d rozmowę diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index b2334994..bfcb2e34 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem certeza que quer deletar todas as mensagens dessa conversa\? + Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 240fd5a5..8ddb10ca 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Tem a certeza de que pretende apagar todas as mensagens desta conversa\? + Are you sure you want to archive %s? %d conversa diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index c754db19..57057632 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Sunteți sigur că doriți să ștergeți toate mesajele din această conversație\? + Are you sure you want to archive %s? %d conversaţie diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index d1bda9c2..437d9a3f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Удалить все сообщения в этой переписке\? + Are you sure you want to archive %s? %d переписку diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 71f57846..b4688546 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -64,6 +64,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste si istý, že chcete odstrániť všetky správy tejto konverzácie\? + Are you sure you want to archive %s? %d konverzáciu diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index d3eae2a4..cde32d48 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Ste prepričani, da želite izbrisati vsa sporočila tega pogovora\? + Are you sure you want to archive %s? %d pogovor diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 5895b9cd..d1d40ae3 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -64,6 +64,7 @@ Да ли сте сигурни да желите да испразните архиву? Све архивиране поруке ће бити избрисане. Да ли сте сигурни да желите да избришете све поруке ове конверзације\? + Are you sure you want to archive %s? %d разговор diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 60504a20..d53547b0 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Är du säker på att du vill ta bort alla meddelanden i konversationen\? + Are you sure you want to archive %s? %d konversation diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index a644be2d..51f65e94 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. இந்த உரையாடலின் அனைத்து செய்திகளையும் நிச்சயமாக நீக்க விரும்புகிறீர்களா\? + Are you sure you want to archive %s? %d உரையாடல் diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 77189473..8ed9d3b5 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -62,6 +62,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation\? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 3bb075db..1ed9856f 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Bu görüşmenin tüm mesajlarını silmek istediğinizden emin misiniz\? + Are you sure you want to archive %s? %d görüşme diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 17c26134..42bc5690 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -65,6 +65,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Справді видалити всі повідомлення у цьому листуванні\? + Are you sure you want to archive %s? %d листування diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 27666a77..3e026582 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -62,6 +62,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您确定要删除此对话的所有消息吗\? + Are you sure you want to archive %s? %d 个对话 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 19517dec..2445ec7a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -62,6 +62,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. 您確定要刪除此對話中的所有訊息嗎? + Are you sure you want to archive %s? %d conversation diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0e44a98b..7729cf32 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -63,6 +63,7 @@ Are you sure you want to empty the archive? All archived conversations will be permanently lost. Are you sure you want to delete all messages of this conversation? + Are you sure you want to archive %s? %d conversation From a3d723835c87e06227db6e5d8ea62cdfbfe3903c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 10:13:29 +0200 Subject: [PATCH 14/19] Add Croatian translation of archive_confirmation --- app/src/main/res/values-hr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 38ddf7b4..04425dd3 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -64,7 +64,7 @@ Jeste li ste sigurni da želite isprazniti arhiv? Svi arhivirani razgovori će biti obrisani. Stvarno želiš izbrisati sve poruke ovog razgovora\? - Are you sure you want to archive %s? + Stvarno želiš arhivirati %s? %d razgovor From a07ac2c8e6cbaeba4ca479cb638ada1ed5372031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 10:14:25 +0200 Subject: [PATCH 15/19] Add Serbian translation for archive_confirmation --- app/src/main/res/values-sr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index d1d40ae3..d5fc14ce 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -64,7 +64,7 @@ Да ли сте сигурни да желите да испразните архиву? Све архивиране поруке ће бити избрисане. Да ли сте сигурни да желите да избришете све поруке ове конверзације\? - Are you sure you want to archive %s? + Да ли сте сигурни да желите да архивирате %s? %d разговор From 9208eedf6bb64af83fe70726a8b8f2c19448967a Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Wed, 19 Jul 2023 14:52:51 +0200 Subject: [PATCH 16/19] adding an empty line --- .../simplemobiletools/smsmessenger/activities/MainActivity.kt | 1 + 1 file changed, 1 insertion(+) 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 9608a6f8..5fe1d64e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -294,6 +294,7 @@ class MainActivity : SimpleActivity() { } catch (e: Exception) { ArrayList() } + val archived = try { conversationsDB.getAllArchived() } catch (e: Exception) { From b9f956f7e8d71d682ef7c26435c43bf8203b3927 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Wed, 19 Jul 2023 14:56:40 +0200 Subject: [PATCH 17/19] updating the slovak translations --- app/src/main/res/values-sk/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index b4688546..0db52540 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -54,17 +54,17 @@ Označiť ako neprečítané Ja - Unarchive - Delete all archived conversations - Archive - Show archived conversations - Archive - No archived conversations have been found - The archive has been emptied successfully - Are you sure you want to empty the archive? All archived conversations will be permanently lost. + Zrušiť archiváciu + Vymazať všetky archivované konverzácie + Archív + Zobraziť archivované konverzácie + Archivovať + Nenašli sa žiadne archivované konverzácie + Archív bol úspešne vyprázdnený + Ste si istý, že chcete vyprázdniť archív? Všetky archivované konverzácie budú navždy odstránené. Ste si istý, že chcete odstrániť všetky správy tejto konverzácie\? - Are you sure you want to archive %s? + Ste si istý, že chcete archivovať %s? %d konverzáciu From e86e089dc5c816b5d00c56ef7115b64f534fa4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 19 Jul 2023 15:30:43 +0200 Subject: [PATCH 18/19] Move thread handling to unarchiveConversation method --- .../adapters/ArchivedConversationsAdapter.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt index 1ca22c72..1fcccf05 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ArchivedConversationsAdapter.kt @@ -26,7 +26,7 @@ class ArchivedConversationsAdapter( when (id) { R.id.cab_delete -> askConfirmDelete() - R.id.cab_unarchive -> ensureBackgroundThread { unarchiveConversation() } + R.id.cab_unarchive -> unarchiveConversation() R.id.cab_select_all -> selectAll() } } @@ -64,12 +64,14 @@ class ArchivedConversationsAdapter( return } - val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList - conversationsToUnarchive.forEach { - activity.updateConversationArchivedStatus(it.threadId, false) - } + ensureBackgroundThread { + val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList + conversationsToUnarchive.forEach { + activity.updateConversationArchivedStatus(it.threadId, false) + } - removeConversationsFromList(conversationsToUnarchive) + removeConversationsFromList(conversationsToUnarchive) + } } private fun removeConversationsFromList(removedConversations: List) { From fd65d26f8ff4b4c7639d5cfbb8f599b870016665 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 19 Jul 2023 16:52:20 +0200 Subject: [PATCH 19/19] updating commons and room --- app/build.gradle | 8 ++++---- .../smsmessenger/activities/ThreadActivity.kt | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c40a46f9..261d359d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:57a5db1ef3' + implementation 'com.github.SimpleMobileTools:Simple-Commons:8814cd2d4b' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:android-smsmms:5657799572' @@ -72,7 +72,7 @@ dependencies { implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' implementation 'androidx.lifecycle:lifecycle-process:2.5.1' - kapt "androidx.room:room-compiler:2.5.1" - implementation "androidx.room:room-runtime:2.5.1" - annotationProcessor "androidx.room:room-compiler:2.5.1" + kapt "androidx.room:room-compiler:2.5.2" + implementation "androidx.room:room-runtime:2.5.2" + annotationProcessor "androidx.room:room-compiler:2.5.2" } 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 2ddf0ac4..82e2003a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt @@ -10,11 +10,9 @@ import android.graphics.BitmapFactory import android.graphics.drawable.LayerDrawable import android.media.MediaMetadataRetriever import android.net.Uri -import android.os.Build import android.os.Bundle import android.provider.ContactsContract import android.provider.MediaStore -import android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM import android.provider.Telephony import android.provider.Telephony.Sms.MESSAGE_TYPE_QUEUED import android.provider.Telephony.Sms.STATUS_NONE @@ -80,7 +78,6 @@ import org.joda.time.DateTime import java.io.File import java.io.InputStream import java.io.OutputStream -import java.security.acl.Permission class ThreadActivity : SimpleActivity() { private val MIN_DATE_TIME_DIFF_SECS = 300 @@ -1171,7 +1168,7 @@ class ThreadActivity : SimpleActivity() { contacts = arrayListOf(contact), showExportingToast = false, ) { - if (it == VcfExporter.ExportResult.EXPORT_OK) { + if (it == ExportResult.EXPORT_OK) { val vCardUri = getMyFileUri(outputFile) runOnUiThread { addAttachment(vCardUri)