go to new Thread activity only if it is different than the current
This commit is contained in:
parent
156620c917
commit
ef09a8871a
1 changed files with 7 additions and 5 deletions
|
|
@ -152,14 +152,16 @@ class ThreadActivity : SimpleActivity() {
|
||||||
thread_add_contacts.beGone()
|
thread_add_contacts.beGone()
|
||||||
|
|
||||||
val numbers = participants.map { it.phoneNumber }.toSet()
|
val numbers = participants.map { it.phoneNumber }.toSet()
|
||||||
val threadId = getThreadId(numbers).toInt()
|
val newThreadId = getThreadId(numbers).toInt()
|
||||||
|
if (threadId != newThreadId) {
|
||||||
Intent(this, ThreadActivity::class.java).apply {
|
Intent(this, ThreadActivity::class.java).apply {
|
||||||
putExtra(THREAD_ID, threadId)
|
putExtra(THREAD_ID, newThreadId)
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun blockNumber() {
|
private fun blockNumber() {
|
||||||
val baseString = R.string.block_confirmation
|
val baseString = R.string.block_confirmation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue