From 7f2f3b599dfe8febcb348f22cb998be8cfe0ece1 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 6 Jan 2021 09:58:44 -0500 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: RichΛrd --- ui/app/AppLayouts/Chat/components/NoFriendsRectangle.qml | 4 +--- ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml | 2 +- ui/imports/Utils.qml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/app/AppLayouts/Chat/components/NoFriendsRectangle.qml b/ui/app/AppLayouts/Chat/components/NoFriendsRectangle.qml index 3f932d052e..f3901f0936 100644 --- a/ui/app/AppLayouts/Chat/components/NoFriendsRectangle.qml +++ b/ui/app/AppLayouts/Chat/components/NoFriendsRectangle.qml @@ -23,9 +23,7 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter anchors.top: noContacts.bottom anchors.topMargin: Style.current.xlPadding - onClicked: { - inviteFriendsPopup.open() - } + onClicked: inviteFriendsPopup.open() } InviteFriendsPopup { id: inviteFriendsPopup diff --git a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml index 56fc997aa6..0175f4d4fd 100644 --- a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml @@ -35,7 +35,7 @@ Item { } StatusSwitch { checked: appSettings.communitiesEnabled - onCheckedChanged: function(value) { + onCheckedChanged: { appSettings.communitiesEnabled = this.checked } } diff --git a/ui/imports/Utils.qml b/ui/imports/Utils.qml index 630197fa96..8845e5f085 100644 --- a/ui/imports/Utils.qml +++ b/ui/imports/Utils.qml @@ -184,7 +184,7 @@ QtObject { } function isHexColor(c) { - return (/^#([0-9A-F]{6}|[0-9A-F]{3})$/i.test(c)) + return (/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/i.test(c)) } function isSpace(c) {