Prevent user from going back to group chat info once chat room has been created using back button so it doesn't create multiple rooms
This commit is contained in:
parent
7657660730
commit
2eef6369bf
1 changed files with 3 additions and 0 deletions
|
@ -204,6 +204,9 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
public void onStateChanged(ChatRoom cr, ChatRoom.State newState) {
|
public void onStateChanged(ChatRoom cr, ChatRoom.State newState) {
|
||||||
if (newState == ChatRoom.State.Created) {
|
if (newState == ChatRoom.State.Created) {
|
||||||
mWaitLayout.setVisibility(View.GONE);
|
mWaitLayout.setVisibility(View.GONE);
|
||||||
|
// This will remove both the creation fragment and the group info fragment from the back stack
|
||||||
|
getFragmentManager().popBackStack();
|
||||||
|
getFragmentManager().popBackStack();
|
||||||
LinphoneActivity.instance().goToChat(cr.getPeerAddress().asStringUriOnly());
|
LinphoneActivity.instance().goToChat(cr.getPeerAddress().asStringUriOnly());
|
||||||
} else if (newState == ChatRoom.State.CreationFailed) {
|
} else if (newState == ChatRoom.State.CreationFailed) {
|
||||||
mWaitLayout.setVisibility(View.GONE);
|
mWaitLayout.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in a new issue