mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 05:38:12 +00:00
Remove conference from Timeline
This commit is contained in:
parent
29121d53f8
commit
3c05d64fb5
4 changed files with 9 additions and 8 deletions
|
|
@ -586,7 +586,7 @@ ChatMessageModel * ChatRoomModel::getReply()const{
|
|||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
void ChatRoomModel::deleteChatRoom(){
|
||||
void ChatRoomModel::markAsToDelete(){
|
||||
mDeleteChatRoom = true;
|
||||
}
|
||||
|
||||
|
|
@ -864,7 +864,8 @@ void ChatRoomModel::initEntries(){
|
|||
// callhistory is sorted from newest to oldest
|
||||
int count = 0;
|
||||
for (auto callLog = callHistory.begin() ; count < mFirstLastEntriesStep && callLog != callHistory.end() ; ++callLog, ++count ){
|
||||
prepareEntries << EntrySorterHelper((*callLog)->getStartDate(), CallEntry, *callLog);
|
||||
if(!(*callLog)->wasConference())
|
||||
prepareEntries << EntrySorterHelper((*callLog)->getStartDate(), CallEntry, *callLog);
|
||||
}
|
||||
}
|
||||
EntrySorterHelper::getLimitedSelection(&entries, prepareEntries, mFirstLastEntriesStep, this);
|
||||
|
|
|
|||
|
|
@ -160,8 +160,7 @@ public:
|
|||
void clearFilesToSend();
|
||||
|
||||
// Tools
|
||||
|
||||
void deleteChatRoom();
|
||||
void markAsToDelete();
|
||||
Q_INVOKABLE void leaveChatRoom ();
|
||||
Q_INVOKABLE void updateParticipants(const QVariantList& participants);
|
||||
void sendMessage (const QString &message);
|
||||
|
|
|
|||
|
|
@ -206,9 +206,10 @@ void TimelineListModel::updateTimelines () {
|
|||
CoreManager *coreManager = CoreManager::getInstance();
|
||||
std::list<std::shared_ptr<linphone::ChatRoom>> allChatRooms = coreManager->getCore()->getChatRooms();
|
||||
|
||||
// Clean terminated chat rooms.
|
||||
// Clean terminated chat rooms and conferences from timeline.
|
||||
allChatRooms.remove_if([](std::shared_ptr<linphone::ChatRoom> chatRoom){
|
||||
bool toRemove = chatRoom->getState() == linphone::ChatRoom::State::Terminated || chatRoom->getState() == linphone::ChatRoom::State::Deleted;
|
||||
bool toRemove = chatRoom->getState() == linphone::ChatRoom::State::Terminated || chatRoom->getState() == linphone::ChatRoom::State::Deleted
|
||||
|| (chatRoom->getConferenceAddress() && chatRoom->getHistoryEventsSize() == 0);
|
||||
if( toRemove)
|
||||
chatRoom->markAsRead();
|
||||
return toRemove;
|
||||
|
|
@ -278,7 +279,7 @@ void TimelineListModel::removeChatRoomModel(QSharedPointer<ChatRoomModel> model)
|
|||
auto timeline = itTimeline->objectCast<TimelineModel>();
|
||||
if(timeline->mChatRoomModel == model){
|
||||
if(model)
|
||||
model->deleteChatRoom();
|
||||
model->markAsToDelete();
|
||||
remove(*itTimeline);
|
||||
return;
|
||||
}else
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d87b868c2ebdeb9a634dfdfd2325412ff9604100
|
||||
Subproject commit 118f804d7d74e04cd4b2a20a53ebf029b5124c02
|
||||
Loading…
Add table
Reference in a new issue