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() {
|
private fun blockNumber() {
|
||||||
val baseString = R.string.block_confirmation
|
val numbers = participants.map { it.phoneNumber }
|
||||||
val numbers = participants.map { it.phoneNumber }.toTypedArray()
|
|
||||||
val numbersString = TextUtils.join(", ", numbers)
|
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) {
|
ConfirmationDialog(this, question) {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
|
|
|
@ -78,9 +78,9 @@ class ConversationsAdapter(activity: SimpleActivity, var conversations: ArrayLis
|
||||||
override fun getItemCount() = conversations.size
|
override fun getItemCount() = conversations.size
|
||||||
|
|
||||||
private fun askConfirmBlock() {
|
private fun askConfirmBlock() {
|
||||||
val numbers = TextUtils.join(", ", getSelectedItems().distinctBy { it.phoneNumber }.map { it.phoneNumber })
|
val numbers = getSelectedItems().distinctBy { it.phoneNumber }.map { it.phoneNumber }
|
||||||
val baseString = R.string.block_confirmation
|
val numbersString = TextUtils.join(", ", numbers)
|
||||||
val question = String.format(resources.getString(baseString), numbers)
|
val question = String.format(resources.getString(R.string.block_confirmation), numbersString)
|
||||||
|
|
||||||
ConfirmationDialog(activity, question) {
|
ConfirmationDialog(activity, question) {
|
||||||
blockNumbers()
|
blockNumbers()
|
||||||
|
|
Loading…
Reference in New Issue