mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Improved ChatMessage setText and setContentType from old API
This commit is contained in:
parent
3163b596c2
commit
10564ec12d
1 changed files with 10 additions and 2 deletions
|
|
@ -236,7 +236,11 @@ const ContentType &ChatMessagePrivate::getContentType () {
|
|||
}
|
||||
|
||||
void ChatMessagePrivate::setContentType (const ContentType &contentType) {
|
||||
internalContent.setContentType(contentType);
|
||||
if (contents.size() > 0 && internalContent.getContentType().isEmpty() && internalContent.isEmpty()) {
|
||||
contents.front()->setContentType(contentType);
|
||||
} else {
|
||||
internalContent.setContentType(contentType);
|
||||
}
|
||||
}
|
||||
|
||||
const string &ChatMessagePrivate::getText () {
|
||||
|
|
@ -265,7 +269,11 @@ const string &ChatMessagePrivate::getText () {
|
|||
}
|
||||
|
||||
void ChatMessagePrivate::setText (const string &text) {
|
||||
internalContent.setBody(text);
|
||||
if (contents.size() > 0 && internalContent.getContentType().isEmpty() && internalContent.isEmpty()) {
|
||||
contents.front()->setBody(text);
|
||||
} else {
|
||||
internalContent.setBody(text);
|
||||
}
|
||||
}
|
||||
|
||||
LinphoneContent *ChatMessagePrivate::getFileTransferInformation () const {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue