mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-20 14:45:59 +02:00
misc: avoid unnecessary signals for contact request
- avoid "needTo" signal/slots and unnecessary propagation loops Gitlab: #86 Gitlab: #88 Change-Id: I25a373b4e02f53502fdc302602ffcc7117b4b97a
This commit is contained in:
parent
d056f56c5e
commit
3a023b0775
4 changed files with 6 additions and 17 deletions
|
@ -306,7 +306,9 @@ Window {
|
||||||
target: AccountAdapter
|
target: AccountAdapter
|
||||||
|
|
||||||
function onUpdateConversationForAddedContact() {
|
function onUpdateConversationForAddedContact() {
|
||||||
mainViewWindowSidePanel.needToUpdateConversationForAddedContact()
|
MessagesAdapter.updateConversationForAddedContact()
|
||||||
|
mainViewWindowSidePanel.clearContactSearchBar()
|
||||||
|
mainViewWindowSidePanel.forceReselectConversationSmartListCurrentIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAccountStatusChanged() {
|
function onAccountStatusChanged() {
|
||||||
|
@ -507,12 +509,6 @@ Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onNeedToUpdateConversationForAddedContact: {
|
|
||||||
MessagesAdapter.updateConversationForAddedContact()
|
|
||||||
mainViewWindowSidePanel.clearContactSearchBar()
|
|
||||||
mainViewWindowSidePanel.forceReselectConversationSmartListCurrentIndex()
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ConversationsAdapter
|
target: ConversationsAdapter
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ Rectangle {
|
||||||
property string headerUserUserNameLabelText: ""
|
property string headerUserUserNameLabelText: ""
|
||||||
|
|
||||||
signal needToHideConversationInCall
|
signal needToHideConversationInCall
|
||||||
signal needToSendContactRequest
|
|
||||||
|
|
||||||
signal sendMessageContentSaved(string arg)
|
signal sendMessageContentSaved(string arg)
|
||||||
signal messagesCleared
|
signal messagesCleared
|
||||||
|
@ -100,10 +99,6 @@ Rectangle {
|
||||||
onNeedToHideConversationInCall: {
|
onNeedToHideConversationInCall: {
|
||||||
messageWebViewRect.needToHideConversationInCall()
|
messageWebViewRect.needToHideConversationInCall()
|
||||||
}
|
}
|
||||||
|
|
||||||
onSendContactRequestButtonClicked: {
|
|
||||||
MessagesAdapter.sendContactRequest()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
|
|
|
@ -34,7 +34,6 @@ Rectangle {
|
||||||
|
|
||||||
signal backClicked
|
signal backClicked
|
||||||
signal needToHideConversationInCall
|
signal needToHideConversationInCall
|
||||||
signal sendContactRequestButtonClicked
|
|
||||||
|
|
||||||
function resetBackToWelcomeViewButtonSource(reset) {
|
function resetBackToWelcomeViewButtonSource(reset) {
|
||||||
backToWelcomeViewButtonSource = reset ? "qrc:/images/icons/ic_arrow_back_24px.svg" : "qrc:/images/icons/round-close-24px.svg"
|
backToWelcomeViewButtonSource = reset ? "qrc:/images/icons/ic_arrow_back_24px.svg" : "qrc:/images/icons/round-close-24px.svg"
|
||||||
|
@ -149,7 +148,7 @@ Rectangle {
|
||||||
onExitColor: "white"
|
onExitColor: "white"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messagingHeaderRect.sendContactRequestButtonClicked()
|
MessagesAdapter.sendContactRequest()
|
||||||
CallAdapter.placeAudioOnlyCall()
|
CallAdapter.placeAudioOnlyCall()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,7 +169,7 @@ Rectangle {
|
||||||
onExitColor: "white"
|
onExitColor: "white"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messagingHeaderRect.sendContactRequestButtonClicked()
|
MessagesAdapter.sendContactRequest()
|
||||||
CallAdapter.placeCall()
|
CallAdapter.placeCall()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,7 +191,7 @@ Rectangle {
|
||||||
onExitColor: "white"
|
onExitColor: "white"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messagingHeaderRect.sendContactRequestButtonClicked()
|
MessagesAdapter.sendContactRequest()
|
||||||
sendContactRequestButtonVisible = false
|
sendContactRequestButtonVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ Rectangle {
|
||||||
property int totalUnreadMessagesCount: 0
|
property int totalUnreadMessagesCount: 0
|
||||||
|
|
||||||
signal conversationSmartListNeedToAccessMessageWebView(string currentUserDisplayName, string currentUserAlias, string currentUID, bool callStackViewShouldShow, bool isAudioOnly, int callState)
|
signal conversationSmartListNeedToAccessMessageWebView(string currentUserDisplayName, string currentUserAlias, string currentUID, bool callStackViewShouldShow, bool isAudioOnly, int callState)
|
||||||
signal needToUpdateConversationForAddedContact
|
|
||||||
|
|
||||||
// Hack -> force redraw.
|
// Hack -> force redraw.
|
||||||
function forceReselectConversationSmartListCurrentIndex() {
|
function forceReselectConversationSmartListCurrentIndex() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue