Merge pull request #216 from Aga-C/going-back-from-thread
Changed back button behavior in thread (#187)
This commit is contained in:
commit
feaddf8558
|
@ -161,6 +161,7 @@ class ThreadActivity : SimpleActivity() {
|
|||
R.id.dial_number -> dialNumber()
|
||||
R.id.manage_people -> managePeople()
|
||||
R.id.mark_as_unread -> markAsUnread()
|
||||
android.R.id.home -> onHomePressed()
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
}
|
||||
return true
|
||||
|
@ -173,6 +174,12 @@ class ThreadActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun onHomePressed() {
|
||||
val intent = Intent(this, MainActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
||||
private fun setupCachedMessages(callback: () -> Unit) {
|
||||
ensureBackgroundThread {
|
||||
messages = try {
|
||||
|
|
Loading…
Reference in New Issue