mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-20 18:48:47 +00:00
ActivityNotification: unnecessary code removed
This commit is contained in:
parent
109edbe7a1
commit
ea584f0693
@ -677,29 +677,7 @@ QtObject {
|
||||
|
||||
//Update oneToOneChatContact when the contact is updated
|
||||
readonly property var myContactsModelConnection: Connections {
|
||||
target: root.contactsStore.myContactsModel ?? null
|
||||
enabled: d.activeChatType === Constants.chatType.oneToOne
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
if (pubKey === d.activeChatId) {
|
||||
d.oneToOneChatContact = Utils.getContactDetailsAsJson(pubKey, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property var receivedContactsReqModelConnection: Connections {
|
||||
target: root.contactsStore.receivedContactRequestsModel ?? null
|
||||
enabled: d.activeChatType === Constants.chatType.oneToOne
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
if (pubKey === d.activeChatId) {
|
||||
d.oneToOneChatContact = Utils.getContactDetailsAsJson(pubKey, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property var sentContactReqModelConnection: Connections {
|
||||
target: root.contactsStore.sentContactRequestsModel ?? null
|
||||
target: root.contactsStore.contactsModel ?? null
|
||||
enabled: d.activeChatType === Constants.chatType.oneToOne
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
|
@ -53,11 +53,7 @@ Item {
|
||||
property bool stickersLoaded: false
|
||||
property bool canPost: true
|
||||
property var viewAndPostHoldingsModel
|
||||
|
||||
readonly property var contactDetails: rootStore ? rootStore.oneToOneChatContact : null
|
||||
readonly property bool isUserAdded: !!root.contactDetails && root.contactDetails.isContactRequestSent
|
||||
property bool amISectionAdmin: false
|
||||
|
||||
property bool sendViaPersonalChatEnabled
|
||||
|
||||
signal openStickerPackPopup(string stickerPackId)
|
||||
|
@ -45,8 +45,6 @@ QtObject {
|
||||
|
||||
readonly property bool isFirstShowcaseInteraction: localAccountSettings.isFirstShowcaseInteraction
|
||||
|
||||
property var details: Utils.getContactDetailsAsJson(pubkey)
|
||||
|
||||
// The following signals wrap the settings / preferences save request responses in one unique result (identity + preferences result)
|
||||
signal profileSettingsSaveSucceeded()
|
||||
signal profileSettingsSaveFailed()
|
||||
|
@ -17,27 +17,6 @@ import "../stores"
|
||||
ActivityNotificationMessage {
|
||||
id: root
|
||||
|
||||
function checkAndUpdateContactDetails(pubKey) {
|
||||
if (pubKey === root.contactId)
|
||||
root.updateContactDetails()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.store.contactsStore.sentContactRequestsModel
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
root.checkAndUpdateContactDetails(pubKey)
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.store.contactsStore.receivedContactRequestsModel
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
root.checkAndUpdateContactDetails(pubKey)
|
||||
}
|
||||
}
|
||||
|
||||
messageSubheaderComponent: StatusBaseText {
|
||||
text: qsTr("Removed you as a contact")
|
||||
font.italic: true
|
||||
|
@ -22,16 +22,6 @@ ActivityNotificationMessage {
|
||||
|
||||
readonly property string contactRequestId: notification && notification.message ? notification.message.id : ""
|
||||
|
||||
Connections {
|
||||
target: root.isOutgoingMessage ? root.store.contactsStore.sentContactRequestsModel :
|
||||
root.store.contactsStore.receivedContactRequestsModel
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
if (pubKey === root.contactId)
|
||||
root.updateContactDetails()
|
||||
}
|
||||
}
|
||||
|
||||
maximumLineCount: 5
|
||||
messageDetails.messageText: !root.isOutgoingMessage && notification ? notification.message.messageText : ""
|
||||
|
||||
|
@ -62,7 +62,7 @@ ActivityNotificationBase {
|
||||
onContactIdChanged: root.updateContactDetails()
|
||||
|
||||
Connections {
|
||||
target: root.store.contactsStore.myContactsModel
|
||||
target: root.store.contactsStore.contactsModel
|
||||
|
||||
function onItemChanged(pubKey) {
|
||||
if (pubKey === root.contactId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user