minor code reformatting at number blocking confirmation
This commit is contained in:
parent
3ac08e2b21
commit
e8f6ec3eb2
|
@ -326,10 +326,9 @@ class ThreadActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun blockNumber() {
|
||||
val baseString = R.string.block_confirmation
|
||||
val numbers = participants.map { it.phoneNumber }.toTypedArray()
|
||||
val numbers = participants.map { it.phoneNumber }
|
||||
val numbersString = TextUtils.join(", ", numbers)
|
||||
val question = String.format(resources.getString(baseString), numbersString)
|
||||
val question = String.format(resources.getString(R.string.block_confirmation), numbersString)
|
||||
|
||||
ConfirmationDialog(this, question) {
|
||||
ensureBackgroundThread {
|
||||
|
|
|
@ -78,9 +78,9 @@ class ConversationsAdapter(activity: SimpleActivity, var conversations: ArrayLis
|
|||
override fun getItemCount() = conversations.size
|
||||
|
||||
private fun askConfirmBlock() {
|
||||
val numbers = TextUtils.join(", ", getSelectedItems().distinctBy { it.phoneNumber }.map { it.phoneNumber })
|
||||
val baseString = R.string.block_confirmation
|
||||
val question = String.format(resources.getString(baseString), numbers)
|
||||
val numbers = getSelectedItems().distinctBy { it.phoneNumber }.map { it.phoneNumber }
|
||||
val numbersString = TextUtils.join(", ", numbers)
|
||||
val question = String.format(resources.getString(R.string.block_confirmation), numbersString)
|
||||
|
||||
ConfirmationDialog(activity, question) {
|
||||
blockNumbers()
|
||||
|
|
Loading…
Reference in New Issue