Fixed display of room events in 1 to 1
This commit is contained in:
parent
c378cedf2b
commit
eeb1672948
2 changed files with 7 additions and 4 deletions
|
@ -490,11 +490,8 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
|||
}
|
||||
}
|
||||
String[] devices = getLc().getVideoDevicesList();
|
||||
if (devices.length != cameras.length) {
|
||||
Log.w("Be careful, there are more cameras available than 2 !");
|
||||
}
|
||||
if (camId >= devices.length) {
|
||||
Log.e("Trying to use a camera that's not in the first two, will crash so use 0 one !");
|
||||
Log.e("Trying to use a camera id that's higher than the linphone's devices list, using 0 to prevent crash...");
|
||||
camId = 0;
|
||||
}
|
||||
String newDevice = devices[camId];
|
||||
|
|
|
@ -1113,18 +1113,21 @@ public class ChatMessagesFragment extends Fragment implements ChatRoomListener,
|
|||
getContactsForParticipants();
|
||||
displayChatRoomHeader();
|
||||
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConferenceLeft(ChatRoom cr, EventLog event) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onParticipantAdminStatusChanged(ChatRoom cr, EventLog event) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
}
|
||||
|
@ -1136,6 +1139,7 @@ public class ChatMessagesFragment extends Fragment implements ChatRoomListener,
|
|||
|
||||
@Override
|
||||
public void onParticipantRemoved(ChatRoom cr, EventLog event) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
getContactsForParticipants();
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
|
@ -1172,6 +1176,7 @@ public class ChatMessagesFragment extends Fragment implements ChatRoomListener,
|
|||
|
||||
@Override
|
||||
public void onParticipantAdded(ChatRoom cr, EventLog event) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
getContactsForParticipants();
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
|
@ -1179,6 +1184,7 @@ public class ChatMessagesFragment extends Fragment implements ChatRoomListener,
|
|||
|
||||
@Override
|
||||
public void onSubjectChanged(ChatRoom cr, EventLog event) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) return;
|
||||
mRoomLabel.setText(event.getSubject());
|
||||
((ChatMessagesGenericAdapter)mChatEventsList.getAdapter()).addToHistory(event);
|
||||
scrollToBottom();
|
||||
|
|
Loading…
Reference in a new issue