mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-17 20:20:53 +01:00
go to new Thread activity only if it is different than the current
This commit is contained in:
parent
156620c917
commit
ef09a8871a
@ -152,11 +152,13 @@ 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()
|
||||||
Intent(this, ThreadActivity::class.java).apply {
|
if (threadId != newThreadId) {
|
||||||
putExtra(THREAD_ID, threadId)
|
Intent(this, ThreadActivity::class.java).apply {
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
putExtra(THREAD_ID, newThreadId)
|
||||||
startActivity(this)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
|
startActivity(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user