Fixed fragment history when navigating between ChatCreation & GroupInfo
This commit is contained in:
parent
cb4051c9ff
commit
562b4d5e2b
3 changed files with 8 additions and 8 deletions
|
@ -721,7 +721,11 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
}
|
||||
}
|
||||
|
||||
public void goToChatCreator(ArrayList<ContactAddress> selectedContacts) {
|
||||
public void goToChatCreator(ArrayList<ContactAddress> selectedContacts, boolean isGoBack) {
|
||||
if (currentFragment == FragmentsAvailable.INFO_GROUP_CHAT && isGoBack) {
|
||||
getFragmentManager().popBackStackImmediate();
|
||||
getFragmentManager().popBackStackImmediate();
|
||||
}
|
||||
Bundle extras = new Bundle();
|
||||
extras.putSerializable("selectedContacts", selectedContacts);
|
||||
changeCurrentFragment(FragmentsAvailable.CREATE_CHAT, extras);
|
||||
|
|
|
@ -331,7 +331,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
enabledDeleteButton(false);
|
||||
}
|
||||
else if (id == R.id.new_discussion) {
|
||||
LinphoneActivity.instance().goToChatCreator(null);
|
||||
LinphoneActivity.instance().goToChatCreator(null, false);
|
||||
/*String sipUri = fastNewChat.getText().toString();
|
||||
if (sipUri.equals("")) {
|
||||
LinphoneActivity.instance().displayContacts(true);
|
||||
|
|
|
@ -84,7 +84,7 @@ public class GroupInfoFragment extends Fragment {
|
|||
mBackButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
LinphoneActivity.instance().goToChatCreator(mParticipants);
|
||||
LinphoneActivity.instance().goToChatCreator(mParticipants, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -103,11 +103,7 @@ public class GroupInfoFragment extends Fragment {
|
|||
mAddParticipantsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (mIsAlreadyCreatedGroup) {
|
||||
//TODO
|
||||
} else {
|
||||
LinphoneActivity.instance().goToChatCreator(mParticipants);
|
||||
}
|
||||
LinphoneActivity.instance().goToChatCreator(mParticipants, !mIsAlreadyCreatedGroup);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue