Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-windows
Commits
6443690a
Commit
6443690a
authored
Jan 10, 2020
by
Ming Rui Zhang
Committed by
Sébastien Blin
Jan 10, 2020
Browse files
callwidget: pass convInfo copies into signal connections
Change-Id: I1c01df9b2726e1f51440836477db56273cffccbf
parent
7091f596
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/callwidget.cpp
View file @
6443690a
...
@@ -955,13 +955,13 @@ CallWidget::setupChatView(const lrc::api::conversation::Info& convInfo)
...
@@ -955,13 +955,13 @@ CallWidget::setupChatView(const lrc::api::conversation::Info& convInfo)
ui
->
messageView
->
setMessagesVisibility
(
false
);
ui
->
messageView
->
setMessagesVisibility
(
false
);
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
sendMessageContentSaved
,
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
sendMessageContentSaved
,
[
this
,
&
convInfo
,
&
accountInfo
,
lastConvUid
=
lastConvUid_
](
const
QString
&
content
)
{
[
this
,
convInfo
,
accountId
=
accountInfo
.
id
,
lastConvUid
=
lastConvUid_
](
const
QString
&
content
)
{
if
(
!
lastConvUid
.
empty
())
{
if
(
!
lastConvUid
.
empty
())
{
LRCInstance
::
setContentDraft
(
LRCInstance
::
setContentDraft
(
lastConvUid
.
c_str
(),
accountI
nfo
.
i
d
.
c_str
(),
content
);
lastConvUid
.
c_str
(),
accountId
.
c_str
(),
content
);
}
}
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
messagesCleared
,
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
messagesCleared
,
[
this
,
&
convInfo
]
{
[
this
,
convInfo
]
{
auto
convModel
=
LRCInstance
::
getCurrentConversationModel
();
auto
convModel
=
LRCInstance
::
getCurrentConversationModel
();
ui
->
messageView
->
printHistory
(
*
convModel
,
convInfo
.
interactions
);
ui
->
messageView
->
printHistory
(
*
convModel
,
convInfo
.
interactions
);
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
messagesLoaded
,
Utils
::
oneShotConnect
(
ui
->
messageView
,
&
MessageWebView
::
messagesLoaded
,
...
@@ -973,7 +973,7 @@ CallWidget::setupChatView(const lrc::api::conversation::Info& convInfo)
...
@@ -973,7 +973,7 @@ CallWidget::setupChatView(const lrc::api::conversation::Info& convInfo)
ui
->
messageView
->
setInvitation
(
false
);
ui
->
messageView
->
setInvitation
(
false
);
ui
->
messageView
->
clear
();
ui
->
messageView
->
clear
();
auto
restoredContent
=
LRCInstance
::
getContentDraft
(
auto
restoredContent
=
LRCInstance
::
getContentDraft
(
convInfo
.
uid
.
c_str
(),
accountI
nfo
.
i
d
.
c_str
());
convInfo
.
uid
.
c_str
(),
accountId
.
c_str
());
ui
->
messageView
->
setSendMessageContent
(
restoredContent
);
ui
->
messageView
->
setSendMessageContent
(
restoredContent
);
ui
->
smartList
->
update
();
ui
->
smartList
->
update
();
});
});
...
...
Write
Preview
Supports
Markdown
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