Fix first message bad displaying
This commit is contained in:
parent
f1972455e5
commit
d2c387ac42
3 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
|||
<bool name="useFirstLoginActivity">false</bool>
|
||||
<bool name="disable_animations">false</bool>
|
||||
<bool name="lock_statusbar">false</bool>
|
||||
<bool name="emoticons_in_messages">false</bool>
|
||||
<bool name="emoticons_in_messages">true</bool>
|
||||
<bool name="only_display_username_if_unknown">true</bool>
|
||||
<bool name="display_messages_time">true</bool> <!-- Used to show the time of each message arrival -->
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneO
|
|||
LinphoneActivity.instance().onMessageSent(sipUri, messageToSend);
|
||||
}
|
||||
|
||||
displayMessage(previousMessageID + 1, messageToSend, getString(R.string.now_date_format), false, messagesLayout);
|
||||
displayMessage(previousMessageID + 2, messageToSend, getString(R.string.now_date_format), false, messagesLayout);
|
||||
scrollToEnd();
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneO
|
|||
@Override
|
||||
public void onMessageReceived(LinphoneAddress from, String message) {
|
||||
if (from.asStringUriOnly().equals(sipUri)) {
|
||||
int id = previousMessageID + 1;
|
||||
int id = previousMessageID + 2;
|
||||
displayMessage(id, message, getString(R.string.now_date_format), true, messagesLayout);
|
||||
scrollToEnd();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Map.Entry;
|
|||
|
||||
import org.linphone.LinphoneUtils;
|
||||
import org.linphone.R;
|
||||
import org.linphone.core.Log;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
|
@ -75,7 +76,7 @@ public class BubbleChat {
|
|||
|
||||
public BubbleChat(Context context, int id, String message, String time, boolean isIncoming, int previousID) {
|
||||
view = new RelativeLayout(context);
|
||||
|
||||
|
||||
LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
|
||||
if (isIncoming) {
|
||||
|
|
Loading…
Reference in a new issue