fix(improvements): remove console warnings pt1

Closes #7959
This commit is contained in:
Alexandra Betouni 2022-12-20 17:23:49 +02:00 committed by Alexandra Betouni
parent 32fcda485c
commit ba811acc27
11 changed files with 33 additions and 30 deletions

View File

@ -24,7 +24,11 @@ Rectangle {
property alias profileComponent: profileItemLoader.sourceComponent
implicitWidth: 78
implicitHeight: layout.implicitHeight
anchors {
fill: parent
topMargin: 48
bottomMargin: 24
}
color: Theme.palette.statusAppNavBar.backgroundColor
@ -41,12 +45,7 @@ Rectangle {
ColumnLayout {
id: layout
anchors {
fill: parent
topMargin: 48
bottomMargin: 24
}
anchors.fill: parent
spacing: d.spacing

View File

@ -87,7 +87,7 @@ Item {
}
Connections {
target: d.chatDetails
target: !!d.chatDetails ? d.chatDetails : null
function onActiveChanged() {
d.markAllMessagesReadIfMostRecentMessageIsInViewport()

View File

@ -43,18 +43,20 @@ StatusSectionLayout {
property bool hasAddedContacts: false
readonly property string filteredSelectedTags: {
if (!community || !community.tags)
if (community && community.tags) {
try {
const json = JSON.parse(community.tags);
const tagsArray = !!json ? json.map(tag => {
return tag.name;
}) : "";
return JSON.stringify(tagsArray);
}
catch (e) {
console.warn("Error parsing community tags: ", community.tags, " error: ", e.message)
return ""
}
} else {
return "";
try {
const json = JSON.parse(community.tags);
const tagsArray = json.map(tag => {
return tag.name;
});
return JSON.stringify(tagsArray);
}
catch (e) {
console.warn("Error parsing community tags: ", community.tags, " error: ", e.message)
return ""
}
}

View File

@ -14,7 +14,7 @@ import "../popups"
Item {
id: root
implicitWidth: 130
implicitHeight: childrenRect.height
implicitHeight: parent.height
property var store
@ -56,8 +56,9 @@ Item {
}
Row {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.halfPadding
spacing: Style.current.smallPadding
visible: chainRepeater.count > 0

View File

@ -47,16 +47,16 @@ Popup {
contentItem: StatusScrollView {
id: scrollView
contentHeight: content.height
width: root.width
height: root.height
contentHeight: content.height
padding: 0
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
Column {
id: content
width: scrollView.availableWidth
width: childrenRect.width
spacing: 4
Repeater {

View File

@ -22,7 +22,7 @@ QtObject {
property var generatedAccounts: walletSectionAccounts.generated
property var appSettings: localAppSettings
property var accountSensitiveSettings: localAccountSensitiveSettings
property string locale: appSettings.locale
property string locale: Qt.locale().name
property bool hideSignPhraseModal: accountSensitiveSettings.hideSignPhraseModal
property var currencyStore: SharedStore.RootStore.currencyStore

View File

@ -137,8 +137,8 @@ Item {
WalletFooter {
id: footer
Layout.fillWidth: true
Layout.leftMargin: -root.StackView.view.anchors.leftMargin
Layout.rightMargin: -root.StackView.view.anchors.rightMargin
Layout.leftMargin: !!root.StackView ? -root.StackView.view.anchors.leftMargin : 0
Layout.rightMargin: !!root.StackView ? -root.StackView.view.anchors.rightMargin : 0
sendModal: root.sendModal
walletStore: RootStore
}

View File

@ -1374,7 +1374,8 @@ Item {
Connections {
target: appMain.rootStore.mainModuleInst
function onActiveSectionChanged() {
rootDropAreaPanel.activeChatType = appMain.rootStore.mainModuleInst.getCommunitySectionModule().activeItem.type
if (!!appMain.rootStore.mainModuleInst.getCommunitySectionModule())
rootDropAreaPanel.activeChatType = appMain.rootStore.mainModuleInst.getCommunitySectionModule().activeItem.type
}
}

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -15,13 +15,13 @@ Control {
property alias controlBackground: controlBackground
property alias rightComponent: rightComponent.sourceComponent
implicitWidth: 66
implicitHeight: 26
horizontalPadding: Style.current.halfPadding
verticalPadding: 5
background: Rectangle {
id: controlBackground
implicitWidth: 66
implicitHeight: 26
color: "transparent"
border.width: 1
border.color: Theme.palette.baseColor2

View File

@ -53,7 +53,7 @@ Menu {
implicitHeight: 34
font.pixelSize: 13
font.weight: checked ? Font.Medium : Font.Normal
icon.color: popupMenuItem.action.asset.color != "#00000000" ? popupMenuItem.action.icon.color : Style.current.blue
icon.color: ((popupMenuItem.action.assetSettings !== undefined) && (popupMenuItem.action.assetSettings.color !== "#00000000")) ? popupMenuItem.action.assetSettings.color : Style.current.blue
icon.source: this.subMenu ? subMenuIcons[subMenuIndex].source : popupMenuItem.action.icon.source
icon.width: this.subMenu ? subMenuIcons[subMenuIndex].width : popupMenuItem.action.icon.width
icon.height: this.subMenu ? subMenuIcons[subMenuIndex].height : popupMenuItem.action.icon.height