Changes related to chatRoom readOnly state
This commit is contained in:
parent
1d15479623
commit
1dbca18fe8
4 changed files with 6 additions and 9 deletions
|
@ -327,7 +327,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter implements ChatMessa
|
|||
case ConferenceCreated:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.conference_created));
|
||||
break;
|
||||
case ConferenceDestroyed:
|
||||
case ConferenceTerminated:
|
||||
holder.eventMessage.setText(mContext.getString(R.string.conference_destroyed));
|
||||
break;
|
||||
case ConferenceParticipantAdded:
|
||||
|
|
|
@ -82,7 +82,6 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
private LayoutInflater mInflater;
|
||||
private ListView mChatEventsList;
|
||||
private LinearLayout mFilesUploadLayout;
|
||||
private boolean mIsReadOnly;
|
||||
private ListSelectionHelper mSelectionHelper;
|
||||
|
||||
private ViewTreeObserver.OnGlobalLayoutListener mKeyboardListener;
|
||||
|
@ -374,7 +373,6 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mRemoteParticipantAddress = mChatRoom.getParticipants()[0].getAddress();
|
||||
}
|
||||
|
||||
mIsReadOnly = mChatRoom.getState() == ChatRoom.State.Terminated;
|
||||
getContactsForParticipants();
|
||||
}
|
||||
|
||||
|
@ -408,7 +406,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
}
|
||||
}
|
||||
|
||||
if (mIsReadOnly) {
|
||||
if (mChatRoom.isReadOnly()) {
|
||||
setReadOnly();
|
||||
}
|
||||
}
|
||||
|
@ -681,8 +679,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
|
||||
@Override
|
||||
public void onStateChanged(ChatRoom cr, ChatRoom.State newState) {
|
||||
mIsReadOnly = mChatRoom.getState() == ChatRoom.State.Terminated;
|
||||
if (mIsReadOnly) {
|
||||
if (mChatRoom.isReadOnly()) {
|
||||
setReadOnly();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
|||
mIsEditionEnabled = getArguments().getBoolean("isEditionEnabled");
|
||||
mSubject = getArguments().getString("subject");
|
||||
|
||||
if (mChatRoom != null && mChatRoom.getState() == ChatRoom.State.Terminated) {
|
||||
if (mChatRoom != null && mChatRoom.isReadOnly()) {
|
||||
mIsEditionEnabled = false;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
|||
}
|
||||
}
|
||||
});
|
||||
mLeaveGroupButton.setVisibility(mIsAlreadyCreatedGroup && mChatRoom.getState() != ChatRoom.State.Terminated ? View.VISIBLE : View.GONE);
|
||||
mLeaveGroupButton.setVisibility(mIsAlreadyCreatedGroup && mChatRoom.isReadOnly() ? View.GONE : View.VISIBLE);
|
||||
|
||||
mAddParticipantsButton = view.findViewById(R.id.addParticipants);
|
||||
mAddParticipantsButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7e48b9c95649a2baf825106665c8bf7870f72abd
|
||||
Subproject commit 397dbc39fbc3f9ce82070f916e52e7f261c058da
|
Loading…
Reference in a new issue