Some UI fix

This commit is contained in:
Erwan Croze 2018-08-20 14:51:13 +02:00
parent 393983708c
commit 51de1a6e38
6 changed files with 11 additions and 8 deletions

View file

@ -39,7 +39,7 @@
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add"
android:visibility="gone"/>
android:visibility="invisible"/>
<ImageView
android:id="@+id/goto_contact"
@ -50,7 +50,7 @@
android:contentDescription="@string/content_description_contacts"
android:padding="15dp"
android:src="@drawable/contact"
android:visibility="gone"/>
android:visibility="invisible"/>
</LinearLayout>
<ScrollView

View file

@ -218,6 +218,7 @@ Vos amis pourront vous joindre plus facilement si vous associez votre compte à
<string name="no_current_call">Aucun appel en cours</string>
<string name="couldnt_accept_call">Une erreur est survenue pendant l\'acceptation de l\'appel</string>
<string name="zrtp_dialog1">Indiquez le code SAS suivant à votre interlocuteur:\nDites: %s</string>
<string name="zrtp_dialog2">\nVotre interlocuteur doit dire: %s</string>
<string name="unknown_incoming_call_name">Inconnu</string>
<string name="call_stats_audio">Audio</string>
<string name="call_stats_video">Vidéo</string>

View file

@ -1250,7 +1250,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
refreshStatusItems(lc.getCurrentCall(), lc.getCurrentCall().getCurrentParams().videoEnabled());
}
if (lc != null) {
if (lc != null && getisZrtpAsk()) {
showZRTPDialog(lc.getCurrentCall());
}

View file

@ -84,14 +84,16 @@ public class ChatEventsAdapter extends ListSelectionAdapter {
private Bitmap mDefaultBitmap;
private GroupChatFragment mFragment;
private ChatMessageListenerStub mListener;
private boolean isOneToOne;
public ChatEventsAdapter(GroupChatFragment fragment, ListSelectionHelper helper, LayoutInflater inflater, EventLog[] history, ArrayList<LinphoneContact> participants) {
public ChatEventsAdapter(GroupChatFragment fragment, ListSelectionHelper helper, LayoutInflater inflater, EventLog[] history, ArrayList<LinphoneContact> participants, boolean oneToOne) {
super(helper);
mFragment = fragment;
mContext = mFragment.getActivity();
mLayoutInflater = inflater;
mHistory = new ArrayList<>(Arrays.asList(history));
mParticipants = participants;
isOneToOne = oneToOne;
mListener = new ChatMessageListenerStub() {
@Override
@ -394,7 +396,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter {
holder.messageDate.setVisibility(View.VISIBLE);
holder.bubbleLayout.setLayoutParams(layoutParams);
} else { // Event is not chat message
} else if (!isOneToOne) { // Event is not chat message
holder.eventLayout.setVisibility(View.VISIBLE);
Address address = event.getParticipantAddress();

View file

@ -569,9 +569,9 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
private void displayChatRoomHistory() {
if (mChatRoom == null) return;
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) {
mEventsAdapter = new ChatEventsAdapter(this, mSelectionHelper, mInflater, mChatRoom.getHistoryMessageEvents(0), mParticipants);
mEventsAdapter = new ChatEventsAdapter(this, mSelectionHelper, mInflater, mChatRoom.getHistoryMessageEvents(0), mParticipants, true);
} else {
mEventsAdapter = new ChatEventsAdapter(this, mSelectionHelper, mInflater, mChatRoom.getHistoryEvents(0), mParticipants);
mEventsAdapter = new ChatEventsAdapter(this, mSelectionHelper, mInflater, mChatRoom.getHistoryEvents(0), mParticipants, false);
}
mSelectionHelper.setAdapter(mEventsAdapter);
mChatEventsList.setAdapter(mEventsAdapter);

@ -1 +1 @@
Subproject commit 035ce38af031fae040b2a32dcd7eb3f8698b8a42
Subproject commit 17be28e9d0b8e50b89ff9fba75990a51f03f111e