mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-17 00:56:39 +00:00
hotfix(ActivityCenter): Fix warnings and text align with messageBadge
This commit is contained in:
parent
9e1f596b6a
commit
2890fe5845
@ -130,15 +130,14 @@ proc messageItem*(self: Item): MessageItem =
|
||||
proc repliedMessageItem*(self: Item): MessageItem =
|
||||
return self.repliedMessageItem
|
||||
|
||||
# TODO: this logic should be moved to status-go
|
||||
# TODO: this logic should be moved to status-go (https://github.com/status-im/status-desktop/issues/8074)
|
||||
proc isNotReadOrActiveCTA*(self: Item): bool =
|
||||
return ((self.notificationType == ActivityCenterNotificationType.CommunityMembershipRequest and
|
||||
self.membershipStatus == ActivityCenterMembershipStatus.Pending) or
|
||||
(self.notificationType == ActivityCenterNotificationType.ContactRequest and
|
||||
self.messageItem.contactRequestState == CONTACT_REQUEST_PENDING_STATE) or
|
||||
(self.notificationType == ActivityCenterNotificationType.ContactVerification and
|
||||
(self.verificationStatus == VerificationStatus.Verifying or
|
||||
self.verificationStatus == VerificationStatus.Verified)) or
|
||||
self.verificationStatus == VerificationStatus.Verifying) or
|
||||
(self.notificationType == ActivityCenterNotificationType.Mention and
|
||||
not self.read) or
|
||||
(self.notificationType == ActivityCenterNotificationType.Reply and
|
||||
|
@ -27,7 +27,7 @@ ActivityNotificationMessage {
|
||||
messageDetails.sender.profileImage.assetSettings.isImage: true
|
||||
messageDetails.sender.profileImage.pubkey: notification ? notification.author : ""
|
||||
messageDetails.sender.profileImage.colorId: Utils.colorIdForPubkey(notification ? notification.author : "")
|
||||
messageDetails.sender.profileImage.colorHash: Utils.getColorHashAsJson(notification ? notification.author : "", contactDetails.ensVerified)
|
||||
messageDetails.sender.profileImage.colorHash: Utils.getColorHashAsJson(notification ? notification.author : "", contactDetails && contactDetails.ensVerified)
|
||||
|
||||
messageBadgeComponent: CommunityBadge {
|
||||
readonly property var community: notification ?
|
||||
|
@ -34,7 +34,7 @@ ActivityNotificationBase {
|
||||
assetSettings.isImage: contactDetails && contactDetails.displayIcon.startsWith("data")
|
||||
pubkey: contactId
|
||||
colorId: Utils.colorIdForPubkey(contactId)
|
||||
colorHash: Utils.getColorHashAsJson(contactId, contactDetails.ensVerified)
|
||||
colorHash: Utils.getColorHashAsJson(contactId, contactDetails && contactDetails.ensVerified)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ RowLayout {
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 15
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.fillWidth: !root.messageBadgeComponent
|
||||
}
|
||||
|
||||
Loader {
|
||||
@ -93,6 +93,10 @@ RowLayout {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: !!root.messageBadgeComponent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user