Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92d68785 authored by Walter Jang's avatar Walter Jang
Browse files

Finish current group activity after creating new groups

Bug 30047708

Change-Id: I70aca1320dfb8a44d1a140d154a6f172ab438315
parent 13710d5d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -245,6 +245,13 @@ public abstract class ContactsDrawerActivity extends AppCompatContactsActivity i
            if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Received group URI " + groupUri);
            Toast.makeText(this, R.string.groupCreatedToast, Toast.LENGTH_SHORT).show();
            startActivity(GroupUtil.createViewGroupIntent(this, groupUri, /* title */ null));
            if (this instanceof GroupMembersActivity) {
                // If we created a group while viewing the members of an existing group (i.e.
                // while on GroupMembersActivity), finish the current GroupMembersActivity so that
                // hitting back from the new GroupMembersActivity that was just stared will open
                // the all contacts list. See b/30047708.
                finish();
            }
        } else {
            super.onNewIntent(newIntent);
        }