Skip to content

Commit

Permalink
fix(StatusMessage): stickers were not aligned correctly
Browse files Browse the repository at this point in the history
Closes #8944
  • Loading branch information
alexandraB99 authored and jrainville committed Jan 25, 2023
1 parent 763041d commit 0fb954b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app_service/service/stickers/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,4 @@ QtObject:
let network = self.networkService.getNetworkForStickers()

let balances = status_go_backend.getTokensBalancesForChainIDs(@[network.chainId], @[account], @[token.addressAsString()]).result
return ens_utils.hex2Token(balances{account}{token.addressAsString()}.getStr, token.decimals)
return ens_utils.hex2Token(balances{account}{token.addressAsString()}.getStr, token.decimals)
12 changes: 8 additions & 4 deletions ui/StatusQ/src/StatusQ/Components/StatusMessage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ Control {

contentItem: Item {

implicitWidth: messageLayout.implicitWidth
implicitWidth: parent.width
implicitHeight: messageLayout.implicitHeight


SequentialAnimation {
id: messageFoundAnimation

Expand Down Expand Up @@ -182,7 +181,8 @@ Control {

ColumnLayout {
id: messageLayout
anchors.fill: parent
width: parent.width
height: childrenRect.height
spacing: 2

Loader {
Expand All @@ -202,6 +202,7 @@ Control {
Layout.fillWidth: true
Layout.leftMargin: 16
Layout.rightMargin: 16
Layout.preferredHeight: childrenRect.height
spacing: 8

StatusSmartIdenticon {
Expand All @@ -226,6 +227,7 @@ Control {
spacing: 2
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
Layout.leftMargin: profileImage.visible ? 0 : root.messageDetails.sender.profileImage.assetSettings.width + parent.spacing

StatusPinMessageDetails {
Expand Down Expand Up @@ -253,7 +255,9 @@ Control {
}
Loader {
Layout.fillWidth: true
active: !root.editMode && !!root.messageDetails.messageText && !root.hideMessage
active: (!root.editMode && !!root.messageDetails.messageText && !root.hideMessage
&& ((root.messageDetails.contentType === StatusMessage.ContentType.Text)
|| (root.messageDetails.contentType === StatusMessage.ContentType.Emoji)))
visible: active
sourceComponent: StatusTextMessage {
objectName: "StatusMessage_textMessage"
Expand Down
2 changes: 2 additions & 0 deletions ui/imports/shared/views/chat/MessageView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ Loader {
StatusMessage {
id: delegate
Layout.fillWidth: true
Layout.topMargin: 2
Layout.bottomMargin: 2

function convertContentType(value) {
switch (value) {
Expand Down

0 comments on commit 0fb954b

Please sign in to comment.