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();
|
Bundle extras = new Bundle();
|
||||||
extras.putSerializable("selectedContacts", selectedContacts);
|
extras.putSerializable("selectedContacts", selectedContacts);
|
||||||
changeCurrentFragment(FragmentsAvailable.CREATE_CHAT, extras);
|
changeCurrentFragment(FragmentsAvailable.CREATE_CHAT, extras);
|
||||||
|
|
|
@ -331,7 +331,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
||||||
enabledDeleteButton(false);
|
enabledDeleteButton(false);
|
||||||
}
|
}
|
||||||
else if (id == R.id.new_discussion) {
|
else if (id == R.id.new_discussion) {
|
||||||
LinphoneActivity.instance().goToChatCreator(null);
|
LinphoneActivity.instance().goToChatCreator(null, false);
|
||||||
/*String sipUri = fastNewChat.getText().toString();
|
/*String sipUri = fastNewChat.getText().toString();
|
||||||
if (sipUri.equals("")) {
|
if (sipUri.equals("")) {
|
||||||
LinphoneActivity.instance().displayContacts(true);
|
LinphoneActivity.instance().displayContacts(true);
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class GroupInfoFragment extends Fragment {
|
||||||
mBackButton.setOnClickListener(new View.OnClickListener() {
|
mBackButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
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() {
|
mAddParticipantsButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (mIsAlreadyCreatedGroup) {
|
LinphoneActivity.instance().goToChatCreator(mParticipants, !mIsAlreadyCreatedGroup);
|
||||||
//TODO
|
|
||||||
} else {
|
|
||||||
LinphoneActivity.instance().goToChatCreator(mParticipants);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue