From a6beb9df07d23f27ab726a4d2fa57d60ceee1cb4 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 9 Nov 2018 13:18:23 +0100 Subject: [PATCH] Disable add participants in group chat infos if group is not created yet (there is a back button) --- src/android/org/linphone/chat/GroupInfoFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/android/org/linphone/chat/GroupInfoFragment.java b/src/android/org/linphone/chat/GroupInfoFragment.java index 997e7b268..7072fc071 100644 --- a/src/android/org/linphone/chat/GroupInfoFragment.java +++ b/src/android/org/linphone/chat/GroupInfoFragment.java @@ -208,7 +208,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener { mAddParticipantsLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - if (mIsEditionEnabled) { + if (mIsEditionEnabled && mIsAlreadyCreatedGroup) { LinphoneActivity.instance().goToChatCreator(mGroupChatRoomAddress != null ? mGroupChatRoomAddress.asString() : null, mParticipants, mSubject, !mIsAlreadyCreatedGroup, null, true, mIsEncryptionEnabled); } } @@ -217,9 +217,12 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener { mAddParticipantsButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - LinphoneActivity.instance().goToChatCreator(mGroupChatRoomAddress != null ? mGroupChatRoomAddress.asString() : null, mParticipants, mSubject, !mIsAlreadyCreatedGroup, null, true, mIsEncryptionEnabled); + if (mIsEditionEnabled && mIsAlreadyCreatedGroup) { + LinphoneActivity.instance().goToChatCreator(mGroupChatRoomAddress != null ? mGroupChatRoomAddress.asString() : null, mParticipants, mSubject, !mIsAlreadyCreatedGroup, null, true, mIsEncryptionEnabled); + } } }); + mAddParticipantsButton.setVisibility(mIsAlreadyCreatedGroup ? View.VISIBLE : View.GONE); mSubjectField = view.findViewById(R.id.subjectField); mSubjectField.addTextChangedListener(new TextWatcher() {