diff --git a/src/widget/form/settings/identityform.cpp b/src/widget/form/settings/identityform.cpp index e1f46d7e4..a5cfc2aa6 100644 --- a/src/widget/form/settings/identityform.cpp +++ b/src/widget/form/settings/identityform.cpp @@ -46,9 +46,9 @@ IdentityForm::IdentityForm() : bodyUI->toxGroup->layout()->addWidget(toxId); - timer.setInterval(1000); + timer.setInterval(750); timer.setSingleShot(true); - connect(&timer, &QTimer::timeout, this, [=]() {bodyUI->toxIdLabel->setText(bodyUI->toxIdLabel->text().replace(" ✔", ""));}); + connect(&timer, &QTimer::timeout, this, [=]() {bodyUI->toxIdLabel->setText(bodyUI->toxIdLabel->text().replace(" ✔", "")); hasCheck = false;}); connect(bodyUI->toxIdLabel, SIGNAL(clicked()), this, SLOT(copyIdClicked())); connect(toxId, SIGNAL(clicked()), this, SLOT(copyIdClicked())); @@ -89,7 +89,11 @@ void IdentityForm::copyIdClicked() QApplication::clipboard()->setText(txt); toxId->setCursorPosition(0); - bodyUI->toxIdLabel->setText(bodyUI->toxIdLabel->text() + " ✔"); + if (!hasCheck) + { + bodyUI->toxIdLabel->setText(bodyUI->toxIdLabel->text() + " ✔"); + hasCheck = true; + } timer.start(); } diff --git a/src/widget/form/settings/identityform.h b/src/widget/form/settings/identityform.h index b30ec8070..843d7e7b1 100644 --- a/src/widget/form/settings/identityform.h +++ b/src/widget/form/settings/identityform.h @@ -74,6 +74,7 @@ private: Ui::IdentitySettings* bodyUI; Core* core; QTimer timer; + bool hasCheck = false; ClickableTE* toxId; };