Don't close app when pressing app icon in main activity.
This commit is contained in:
parent
5e00a2341c
commit
0d56efc232
1 changed files with 2 additions and 1 deletions
|
@ -126,6 +126,7 @@ class MainActivity extends EnsichatActivity {
|
||||||
|
|
||||||
override def onOptionsItemSelected(item: MenuItem): Boolean = item.getItemId match {
|
override def onOptionsItemSelected(item: MenuItem): Boolean = item.getItemId match {
|
||||||
case android.R.id.home =>
|
case android.R.id.home =>
|
||||||
|
if (currentChat.isDefined)
|
||||||
onBackPressed()
|
onBackPressed()
|
||||||
true;
|
true;
|
||||||
case _ =>
|
case _ =>
|
||||||
|
|
Reference in a new issue