Changed back button behavior in thread (#187)
This commit is contained in:
parent
1a4ceadbee
commit
cce617b12f
|
@ -159,6 +159,7 @@ class ThreadActivity : SimpleActivity() {
|
||||||
R.id.delete -> askConfirmDelete()
|
R.id.delete -> askConfirmDelete()
|
||||||
R.id.manage_people -> managePeople()
|
R.id.manage_people -> managePeople()
|
||||||
R.id.mark_as_unread -> markAsUnread()
|
R.id.mark_as_unread -> markAsUnread()
|
||||||
|
android.R.id.home -> onBackPressed()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -171,6 +172,13 @@ class ThreadActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onBackPressed() {
|
||||||
|
super.onBackPressed()
|
||||||
|
val intent = Intent(this, MainActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupCachedMessages(callback: () -> Unit) {
|
private fun setupCachedMessages(callback: () -> Unit) {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
messages = try {
|
messages = try {
|
||||||
|
|
Loading…
Reference in New Issue