mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-24 15:18:07 +00:00
Remove video conference chat rooms from timeline (not implemented yet)
This commit is contained in:
parent
e96c2044da
commit
e5d5a9c0e8
4 changed files with 14 additions and 5 deletions
|
|
@ -166,7 +166,7 @@ ContactModel *CallModel::getContactModel() const{
|
|||
}
|
||||
|
||||
ChatRoomModel * CallModel::getChatRoomModel(){
|
||||
if(mCall && mCall->getCallLog()->getCallId() != "" ){
|
||||
if(mCall && mCall->getCallLog()->getCallId() != "" && !isConference()){// No chat rooms for conference (TODO)
|
||||
auto currentParams = mCall->getCurrentParams();
|
||||
bool isEncrypted = currentParams->getMediaEncryption() != linphone::MediaEncryption::None;
|
||||
SettingsModel * settingsModel = CoreManager::getInstance()->getSettingsModel();
|
||||
|
|
|
|||
|
|
@ -409,6 +409,10 @@ bool ChatRoomModel::haveEncryption() const{
|
|||
return mChatRoom && mChatRoom->getCurrentParams()->getEncryptionBackend() != linphone::ChatRoomEncryptionBackend::None;
|
||||
}
|
||||
|
||||
bool ChatRoomModel::haveConferenceAddress() const{
|
||||
return mChatRoom && (mChatRoom->getConferenceAddress() || getFullPeerAddress().toLower().contains("conf-id"));
|
||||
}
|
||||
|
||||
bool ChatRoomModel::markAsReadEnabled() const{
|
||||
return mMarkAsReadEnabled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public:
|
|||
long getEphemeralLifetime() const;
|
||||
bool canBeEphemeral();
|
||||
bool haveEncryption() const;
|
||||
bool haveConferenceAddress() const;
|
||||
bool markAsReadEnabled() const;
|
||||
Q_INVOKABLE bool isSecure() const;
|
||||
int getSecurityLevel() const;
|
||||
|
|
|
|||
|
|
@ -264,10 +264,14 @@ void TimelineListModel::updateTimelines () {
|
|||
}
|
||||
|
||||
void TimelineListModel::add (QSharedPointer<TimelineModel> timeline){
|
||||
connect(timeline->getChatRoomModel(), &ChatRoomModel::lastUpdateTimeChanged, this, &TimelineListModel::updated);
|
||||
ProxyListModel::add(timeline);
|
||||
emit layoutChanged();
|
||||
emit countChanged();
|
||||
auto chatRoomModel = timeline->getChatRoomModel();
|
||||
auto chatRoom = chatRoomModel->getChatRoom();
|
||||
if( !chatRoomModel->haveConferenceAddress() || chatRoom->getHistoryEventsSize() != 0) {
|
||||
connect(chatRoomModel, &ChatRoomModel::lastUpdateTimeChanged, this, &TimelineListModel::updated);
|
||||
ProxyListModel::add(timeline);
|
||||
emit layoutChanged();
|
||||
emit countChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void TimelineListModel::removeChatRoomModel(QSharedPointer<ChatRoomModel> model){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue