mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
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:
parent
cf3ee4b3a4
commit
085de2825a
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue