Do not use addParticipants to allow group chat with only one person in it + remove add to contact to ougoing messages' context menu
This commit is contained in:
parent
69ef2a8ee4
commit
3bb2e3ecdb
3 changed files with 4 additions and 6 deletions
|
@ -426,6 +426,8 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
||||||
if (contact != null) {
|
if (contact != null) {
|
||||||
menu.removeItem(R.id.add_to_contacts);
|
menu.removeItem(R.id.add_to_contacts);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
menu.removeItem(R.id.add_to_contacts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,14 +263,9 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
mWaitLayout.setVisibility(View.VISIBLE);
|
mWaitLayout.setVisibility(View.VISIBLE);
|
||||||
mTempChatRoom = LinphoneManager.getLc().createClientGroupChatRoom(mSubjectField.getText().toString(), false, mIsEncryptionEnabled);
|
mTempChatRoom = LinphoneManager.getLc().createClientGroupChatRoom(mSubjectField.getText().toString(), false, mIsEncryptionEnabled);
|
||||||
mTempChatRoom.addListener(mChatRoomCreationListener);
|
mTempChatRoom.addListener(mChatRoomCreationListener);
|
||||||
|
|
||||||
Address addresses[] = new Address[mParticipants.size()];
|
|
||||||
int index = 0;
|
|
||||||
for (ContactAddress ca : mParticipants) {
|
for (ContactAddress ca : mParticipants) {
|
||||||
addresses[index] = ca.getAddress();
|
mTempChatRoom.addParticipant(ca.getAddress());
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
mTempChatRoom.addParticipants(addresses);
|
|
||||||
} else {
|
} else {
|
||||||
// Subject
|
// Subject
|
||||||
String newSubject = mSubjectField.getText().toString();
|
String newSubject = mSubjectField.getText().toString();
|
||||||
|
|
|
@ -124,6 +124,7 @@ public class ImdnFragment extends Fragment {
|
||||||
refreshInfo();
|
refreshInfo();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (mMessage == null) return null;
|
||||||
mMessage.setListener(mListener);
|
mMessage.setListener(mListener);
|
||||||
|
|
||||||
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
|
Loading…
Reference in a new issue