Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-windows
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
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
Hide 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) :
...
@@ -213,7 +213,7 @@ CallWidget::CallWidget(QWidget* parent) :
[
this
](
const
std
::
string
&
accountId
,
const
std
::
string
&
conversation
,
[
this
](
const
std
::
string
&
accountId
,
const
std
::
string
&
conversation
,
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
{
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
{
if
(
LRCInstance
::
getCurrAccId
()
!=
accountId
)
{
if
(
LRCInstance
::
getCurrAccId
()
!=
accountId
)
{
on
IncomingMessage
(
accountId
,
conversation
,
interactionId
,
interaction
);
on
NewInteraction
(
accountId
,
conversation
,
interactionId
,
interaction
);
}
}
});
});
...
@@ -304,7 +304,7 @@ CallWidget::getLeftPanelWidth()
...
@@ -304,7 +304,7 @@ CallWidget::getLeftPanelWidth()
}
}
void
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
)
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
{
{
Q_UNUSED
(
interactionId
);
Q_UNUSED
(
interactionId
);
...
@@ -315,7 +315,8 @@ CallWidget::onIncomingMessage(const std::string& accountId, const std::string& c
...
@@ -315,7 +315,8 @@ CallWidget::onIncomingMessage(const std::string& accountId, const std::string& c
if
(
conversation
.
uid
.
empty
())
{
if
(
conversation
.
uid
.
empty
())
{
return
;
return
;
}
}
if
(
!
QApplication
::
focusWidget
()
||
LRCInstance
::
getCurrAccId
()
!=
accountId
)
{
if
(
!
interaction
.
authorUri
.
empty
()
&&
(
!
QApplication
::
focusWidget
()
||
LRCInstance
::
getCurrAccId
()
!=
accountId
))
{
auto
bestName
=
Utils
::
bestNameForConversation
(
conversation
,
*
convModel
);
auto
bestName
=
Utils
::
bestNameForConversation
(
conversation
,
*
convModel
);
Utils
::
showSystemNotification
(
this
,
Utils
::
showSystemNotification
(
this
,
QString
::
fromStdString
(
bestName
),
QString
::
fromStdString
(
bestName
),
...
@@ -1164,7 +1165,7 @@ CallWidget::connectConversationModel()
...
@@ -1164,7 +1165,7 @@ CallWidget::connectConversationModel()
[
this
](
const
std
::
string
&
convUid
,
uint64_t
interactionId
,
[
this
](
const
std
::
string
&
convUid
,
uint64_t
interactionId
,
const
lrc
::
api
::
interaction
::
Info
&
interaction
)
{
const
lrc
::
api
::
interaction
::
Info
&
interaction
)
{
auto
accountId
=
LRCInstance
::
getCurrAccId
();
auto
accountId
=
LRCInstance
::
getCurrAccId
();
on
IncomingMessage
(
accountId
,
convUid
,
interactionId
,
interaction
);
on
NewInteraction
(
accountId
,
convUid
,
interactionId
,
interaction
);
}
}
);
);
interactionRemovedConnection_
=
QObject
::
connect
(
interactionRemovedConnection_
=
QObject
::
connect
(
...
...
callwidget.h
View file @
df38b4eb
...
@@ -105,7 +105,7 @@ private slots:
...
@@ -105,7 +105,7 @@ private slots:
private:
private:
void
callTerminating
(
const
std
::
string
&
callid
);
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
);
uint64_t
interactionId
,
const
lrc
::
api
::
interaction
::
Info
&
interaction
);
void
conversationsButtonClicked
();
void
conversationsButtonClicked
();
void
invitationsButtonClicked
();
void
invitationsButtonClicked
();
...
...
utils.cpp
View file @
df38b4eb
...
@@ -272,20 +272,18 @@ Utils::setStackWidget(QStackedWidget* stack, QWidget* widget)
...
@@ -272,20 +272,18 @@ 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"
));
GlobalSystemTray
::
instance
().
showMessage
(
message
,
""
,
QIcon
(
":images/jami.png"
));
QApplication
::
alert
(
widget
,
delay
);
QApplication
::
alert
(
widget
,
delay
);
}
}
void
Utils
::
showSystemNotification
(
QWidget
*
widget
,
void
Utils
::
showSystemNotification
(
QWidget
*
widget
,
const
QString
&
sender
,
const
QString
&
sender
,
const
QString
&
message
,
const
QString
&
message
,
long
delay
)
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
);
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