Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
0f09a0b5
Commit
0f09a0b5
authored
Jan 26, 2018
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ChatModel): ignore CallStatusAcceptedElsewhere and CallStatusDeclinedElsewhere states
parent
6715a13e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
ChatModel.cpp
src/components/chat/ChatModel.cpp
+16
-12
No files found.
src/components/chat/ChatModel.cpp
View file @
0f09a0b5
...
...
@@ -608,6 +608,10 @@ void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) {
case
linphone
:
:
CallStatusEarlyAborted
:
return
;
// Ignore aborted calls.
case
linphone
:
:
CallStatusAcceptedElsewhere
:
case
linphone
:
:
CallStatusDeclinedElsewhere
:
return
;
// Ignore accepted calls on other device.
case
linphone
:
:
CallStatusSuccess
:
case
linphone
:
:
CallStatusMissed
:
case
linphone
:
:
CallStatusDeclined
:
...
...
@@ -615,21 +619,21 @@ void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) {
}
auto
insertEntry
=
[
this
](
const
ChatEntryData
&
pair
,
const
QList
<
ChatEntryData
>::
iterator
*
start
=
NULL
)
{
auto
it
=
lower_bound
(
start
?
*
start
:
mEntries
.
begin
(),
mEntries
.
end
(),
pair
,
[](
const
ChatEntryData
&
a
,
const
ChatEntryData
&
b
)
{
return
a
.
first
[
"timestamp"
]
<
b
.
first
[
"timestamp"
];
});
const
ChatEntryData
&
pair
,
const
QList
<
ChatEntryData
>::
iterator
*
start
=
NULL
)
{
auto
it
=
lower_bound
(
start
?
*
start
:
mEntries
.
begin
(),
mEntries
.
end
(),
pair
,
[](
const
ChatEntryData
&
a
,
const
ChatEntryData
&
b
)
{
return
a
.
first
[
"timestamp"
]
<
b
.
first
[
"timestamp"
];
});
int
row
=
static_cast
<
int
>
(
distance
(
mEntries
.
begin
(),
it
));
int
row
=
static_cast
<
int
>
(
distance
(
mEntries
.
begin
(),
it
));
beginInsertRows
(
QModelIndex
(),
row
,
row
);
it
=
mEntries
.
insert
(
it
,
pair
);
endInsertRows
();
beginInsertRows
(
QModelIndex
(),
row
,
row
);
it
=
mEntries
.
insert
(
it
,
pair
);
endInsertRows
();
return
it
;
};
return
it
;
};
// Add start call.
QVariantMap
start
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment