mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix multiple compose (can show when killing remote while composing)
This commit is contained in:
parent
89e976f649
commit
7e12a3d5d5
1 changed files with 6 additions and 7 deletions
|
|
@ -771,13 +771,12 @@ void ChatRoomModel::handlePresenceStatusReceived(std::shared_ptr<linphone::Frien
|
|||
//----------------------------------------------------------
|
||||
|
||||
void ChatRoomModel::onIsComposingReceived(const std::shared_ptr<linphone::ChatRoom> & chatRoom, const std::shared_ptr<const linphone::Address> & remoteAddress, bool isComposing){
|
||||
if(!isComposing) {
|
||||
auto it = mComposers.begin();
|
||||
while(it != mComposers.end() && !it.key()->weakEqual(remoteAddress))
|
||||
++it;
|
||||
if(it != mComposers.end())
|
||||
mComposers.erase(it);
|
||||
}else
|
||||
auto it = mComposers.begin();
|
||||
while(it != mComposers.end() && !it.key()->weakEqual(remoteAddress))
|
||||
++it;
|
||||
if(it != mComposers.end())
|
||||
mComposers.erase(it);
|
||||
if(isComposing)
|
||||
mComposers[remoteAddress] = Utils::getDisplayName(remoteAddress);
|
||||
emit isRemoteComposingChanged();
|
||||
setLastUpdateTime(QDateTime::fromMSecsSinceEpoch(chatRoom->getLastUpdateTime()));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue