feat: Code review remarks
This commit is contained in:
parent
04341f0321
commit
9c3914ab1d
|
@ -32,7 +32,6 @@ SplitView {
|
|||
isAReply: false
|
||||
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
|
||||
outgoingStatus: StatusMessage.OutgoingStatus.Delivered
|
||||
requeestPaymentModel: []
|
||||
}
|
||||
ListElement {
|
||||
timestamp: 1657937930135
|
||||
|
|
|
@ -391,7 +391,7 @@ Item {
|
|||
d.activeChatContentModule.inputAreaModule.setLinkPreviewEnabledForCurrentMessage(false)
|
||||
}
|
||||
onDismissLinkPreview: (index) => d.activeChatContentModule.inputAreaModule.removeLinkPreviewData(index)
|
||||
onRemovePaymentRequest: (index) => d.activeChatContentModule.inputAreaModule.removePaymentRequestPreviewData(index)
|
||||
onRemovePaymentRequestPreviewRequested: (index) => d.activeChatContentModule.inputAreaModule.removePaymentRequestPreviewData(index)
|
||||
}
|
||||
|
||||
ChatPermissionQualificationPanel {
|
||||
|
|
|
@ -47,7 +47,7 @@ Control {
|
|||
signal linkReload(string link)
|
||||
signal linkClicked(string link)
|
||||
|
||||
signal removePaymentRequest(int index)
|
||||
signal removePaymentRequestPreviewRequested(int index)
|
||||
|
||||
signal enableLinkPreview()
|
||||
signal enableLinkPreviewForThisMessage()
|
||||
|
@ -112,7 +112,7 @@ Control {
|
|||
|
||||
amount: model.amount
|
||||
symbol: model.symbol
|
||||
onClose: root.removePaymentRequest(model.index)
|
||||
onClose: root.removePaymentRequestPreviewRequested(model.index)
|
||||
}
|
||||
}
|
||||
Repeater {
|
||||
|
|
|
@ -37,7 +37,7 @@ Rectangle {
|
|||
signal disableLinkPreview()
|
||||
signal dismissLinkPreviewSettings()
|
||||
signal dismissLinkPreview(int index)
|
||||
signal removePaymentRequest(int index)
|
||||
signal removePaymentRequestPreviewRequested(int index)
|
||||
|
||||
property var usersModel
|
||||
property SharedStores.RootStore sharedStore
|
||||
|
@ -1244,7 +1244,7 @@ Rectangle {
|
|||
onDisableLinkPreview: () => control.disableLinkPreview()
|
||||
onDismissLinkPreviewSettings: () => control.dismissLinkPreviewSettings()
|
||||
onDismissLinkPreview: (index) => control.dismissLinkPreview(index)
|
||||
onRemovePaymentRequest: (index) => control.removePaymentRequest(index)
|
||||
onRemovePaymentRequestPreviewRequested: (index) => control.removePaymentRequestPreviewRequested(index)
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
|
@ -40,7 +40,7 @@ Flow {
|
|||
signal imageClicked(var image, var mouse, string imageSource, string url)
|
||||
signal openContextMenu(var item, string url, string domain)
|
||||
signal setNeverAskAboutUnfurlingAgain(bool neverAskAgain)
|
||||
signal paymentRequestClicked(var symbol, var amount, var receiver, var chainId)
|
||||
signal paymentRequestClicked(int index)
|
||||
|
||||
function resetLocalAskAboutUnfurling() {
|
||||
d.localAskAboutUnfurling = true
|
||||
|
@ -75,7 +75,7 @@ Flow {
|
|||
senderName: root.senderName
|
||||
senderThumbnailImage: root.senderThumbnailImage
|
||||
senderColorId: root.senderColorId
|
||||
onClicked: root.paymentRequestClicked(model.symbol, model.amount, model.receiver, model.chainId)
|
||||
onClicked: root.paymentRequestClicked(model.index)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -992,7 +992,13 @@ Loader {
|
|||
gifUnfurlingEnabled: root.sharedRootStore.gifUnfurlingEnabled
|
||||
canAskToUnfurlGifs: !root.sharedRootStore.neverAskAboutUnfurlingAgain
|
||||
onSetNeverAskAboutUnfurlingAgain: root.sharedRootStore.setNeverAskAboutUnfurlingAgain(neverAskAgain)
|
||||
onPaymentRequestClicked: Global.paymentRequestClicked(receiver, symbol, amount, chainId)
|
||||
onPaymentRequestClicked: (index) => {
|
||||
const receiver = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "receiver")
|
||||
const amount = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "amount")
|
||||
const symbol = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "symbol")
|
||||
const chainId = StatusQUtils.ModelUtils.get(paymentRequestModel, index, "chainId")
|
||||
Global.paymentRequestClicked(receiver, symbol, amount, chainId)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
root.messageStore.messageModule.forceLinkPreviewsLocalData(root.messageId)
|
||||
|
|
Loading…
Reference in New Issue