mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Checks if share link exists before settings password.
Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
parent
8e0398426d
commit
2cd32261a2
1 changed files with 2 additions and 5 deletions
|
@ -386,19 +386,16 @@ void ShareLinkWidget::setPassword(const QString &password)
|
|||
|
||||
void ShareLinkWidget::slotPasswordSet()
|
||||
{
|
||||
auto share = selectedShare();
|
||||
if (sender() != share.data())
|
||||
if (!_linkShare)
|
||||
return;
|
||||
|
||||
_pi_password->stopAnimation();
|
||||
_ui->checkBox_password->setEnabled(true);
|
||||
_ui->lineEdit_password->setText(QString());
|
||||
if (share->isPasswordSet()) {
|
||||
if (_linkShare->isPasswordSet()) {
|
||||
_ui->lineEdit_password->setPlaceholderText("********");
|
||||
_ui->lineEdit_password->setEnabled(true);
|
||||
} else {
|
||||
_ui->lineEdit_password->setPlaceholderText(QString());
|
||||
_ui->lineEdit_password->setEnabled(false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue