Enhancement #534: hide tool button when there is no share link.

- Only display button when there is a share link.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-08-19 13:06:48 +02:00
parent cf3ee4b3a4
commit 085de2825a
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4

View file

@ -58,6 +58,7 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account,
, _unshareLinkAction(nullptr)
{
_ui->setupUi(this);
_ui->shareLinkToolButton->hide();
//Is this a file or folder?
QFileInfo fi(localPath);
@ -265,6 +266,9 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
_ui->shareLinkToolButton->setEnabled(true);
_ui->enableShareLink->setEnabled(true);
_ui->enableShareLink->setChecked(true);
// show sharing options
_ui->shareLinkToolButton->show();
}
}
@ -411,6 +415,7 @@ void ShareLinkWidget::slotDeleteShareFetched()
_linkShare.clear();
_ui->enableShareLink->setChecked(false);
_ui->shareLinkToolButton->setEnabled(false);
_ui->shareLinkToolButton->hide();
getShares();
}