Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-windows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
savoirfairelinux
jami-client-windows
Commits
df38b4eb
Commit
df38b4eb
authored
Nov 19, 2019
by
Andreas Traczyk
Committed by
Ming Rui Zhang
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notifications: prevent notifications for outgoing calls
Change-Id: I98df72f4e3a4e710dc2279b6b5388ab613254338
parent
8cc7fc7d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
callwidget.cpp
callwidget.cpp
+5
-4
callwidget.h
callwidget.h
+1
-1
utils.cpp
utils.cpp
+5
-7
No files found.
callwidget.cpp
View file @
df38b4eb
...
...
@@ -213,7 +213,7 @@ CallWidget::CallWidget(QWidget* parent) :
[
this
](
const
std
::
string
&
accountId
,
const
std
::
string
&
conversation
,
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
{
if
(
LRCInstance
::
getCurrAccId
()
!=
accountId
)
{
on
IncomingMessage
(
accountId
,
conversation
,
interactionId
,
interaction
);
on
NewInteraction
(
accountId
,
conversation
,
interactionId
,
interaction
);
}
});
...
...
@@ -304,7 +304,7 @@ CallWidget::getLeftPanelWidth()
}
void
CallWidget
::
on
IncomingMessage
(
const
std
::
string
&
accountId
,
const
std
::
string
&
convUid
,
CallWidget
::
on
NewInteraction
(
const
std
::
string
&
accountId
,
const
std
::
string
&
convUid
,
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
{
Q_UNUSED
(
interactionId
);
...
...
@@ -315,7 +315,8 @@ CallWidget::onIncomingMessage(const std::string& accountId, const std::string& c
if
(
conversation
.
uid
.
empty
())
{
return
;
}
if
(
!
QApplication
::
focusWidget
()
||
LRCInstance
::
getCurrAccId
()
!=
accountId
)
{
if
(
!
interaction
.
authorUri
.
empty
()
&&
(
!
QApplication
::
focusWidget
()
||
LRCInstance
::
getCurrAccId
()
!=
accountId
))
{
auto
bestName
=
Utils
::
bestNameForConversation
(
conversation
,
*
convModel
);
Utils
::
showSystemNotification
(
this
,
QString
::
fromStdString
(
bestName
),
...
...
@@ -1164,7 +1165,7 @@ CallWidget::connectConversationModel()
[
this
](
const
std
::
string
&
convUid
,
uint64_t
interactionId
,
const
lrc
::
api
::
interaction
::
Info
&
interaction
)
{
auto
accountId
=
LRCInstance
::
getCurrAccId
();
on
IncomingMessage
(
accountId
,
convUid
,
interactionId
,
interaction
);
on
NewInteraction
(
accountId
,
convUid
,
interactionId
,
interaction
);
}
);
interactionRemovedConnection_
=
QObject
::
connect
(
...
...
callwidget.h
View file @
df38b4eb
...
...
@@ -105,7 +105,7 @@ private slots:
private:
void
callTerminating
(
const
std
::
string
&
callid
);
void
on
IncomingMessage
(
const
std
::
string
&
accountId
,
const
std
::
string
&
convUid
,
void
on
NewInteraction
(
const
std
::
string
&
accountId
,
const
std
::
string
&
convUid
,
uint64_t
interactionId
,
const
lrc
::
api
::
interaction
::
Info
&
interaction
);
void
conversationsButtonClicked
();
void
invitationsButtonClicked
();
...
...
utils.cpp
View file @
df38b4eb
...
...
@@ -272,7 +272,7 @@ Utils::setStackWidget(QStackedWidget* stack, QWidget* widget)
}
}
void
Utils
::
showSystemNotification
(
QWidget
*
widget
,
const
QString
&
message
,
long
delay
)
void
Utils
::
showSystemNotification
(
QWidget
*
widget
,
const
QString
&
message
,
long
delay
)
{
GlobalSystemTray
::
instance
().
showMessage
(
message
,
""
,
QIcon
(
":images/jami.png"
));
QApplication
::
alert
(
widget
,
delay
);
...
...
@@ -283,9 +283,7 @@ void Utils::showSystemNotification(QWidget* widget,
const
QString
&
message
,
long
delay
)
{
QIcon
();
GlobalSystemTray
::
instance
()
.
showMessage
(
sender
,
message
,
QIcon
(
":images/jami.png"
));
GlobalSystemTray
::
instance
().
showMessage
(
sender
,
message
,
QIcon
(
":images/jami.png"
));
QApplication
::
alert
(
widget
,
delay
);
}
...
...
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