fix: code review

This commit is contained in:
Richard Ramos 2020-06-23 15:04:08 -04:00 committed by Iuri Matias
parent 637484bd79
commit 81b103b0eb
2 changed files with 204 additions and 204 deletions

View File

@ -1,6 +1,4 @@
import strformat
import strutils
import qrcodegen
import strformat, strutils, qrcodegen
proc generateQRCodeSVG*(text: string, border: int = 0): string =
var qr0: array[0..qrcodegen_BUFFER_LEN_MAX, uint8]

View File

@ -66,7 +66,6 @@ ModalPopup {
color: Theme.darkGrey
}
Rectangle {
id: qrCodeButton
height: 32
@ -190,7 +189,8 @@ ModalPopup {
StyledText {
id: valueShareURL
text: "https://join.status.im/u/" + fromAuthor.substr(0, 4) + "..." + fromAuthor.substr(fromAuthor.length - 5)
text: "https://join.status.im/u/" + fromAuthor.substr(
0, 4) + "..." + fromAuthor.substr(fromAuthor.length - 5)
font.pixelSize: 14
anchors.left: parent.left
anchors.leftMargin: Theme.smallPadding
@ -228,7 +228,6 @@ ModalPopup {
// }
// }
// }
footer: Item {
width: parent.width
height: children[0].height
@ -240,7 +239,8 @@ ModalPopup {
anchors.bottom: parent.bottom
onClicked: {
profilePopup.close()
if (tabBar.currentIndex !== 0) tabBar.currentIndex = 0
if (tabBar.currentIndex !== 0)
tabBar.currentIndex = 0
chatsModel.joinChat(fromAuthor, Constants.chatTypeOneToOne)
}
}
@ -266,7 +266,9 @@ ModalPopup {
id: addToContactsButton
anchors.right: parent.right
anchors.rightMargin: Theme.smallPadding
label: profileModel.isAdded(fromAuthor) ? qsTr("Remove Contact") : qsTr("Add to contacts")
label: profileModel.isAdded(
fromAuthor) ? qsTr("Remove Contact") : qsTr(
"Add to contacts")
anchors.bottom: parent.bottom
onClicked: {
if (profileModel.isAdded(fromAuthor)) {