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,7 +126,8 @@ class MainActivity extends EnsichatActivity {
|
|||
|
||||
override def onOptionsItemSelected(item: MenuItem): Boolean = item.getItemId match {
|
||||
case android.R.id.home =>
|
||||
onBackPressed()
|
||||
if (currentChat.isDefined)
|
||||
onBackPressed()
|
||||
true;
|
||||
case _ =>
|
||||
super.onOptionsItemSelected(item);
|
||||
|
|
Reference in a new issue