From 2e69a9c59a743db3d47e01ebcbc5774a073fe4d8 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 28 Feb 2023 23:18:05 +0100 Subject: [PATCH] Move sharesChanged signal emission to handlePlaceholderLinkShare rather than repeating each time this method is called Signed-off-by: Claudio Cambra --- src/gui/filedetails/sharemodel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index 178cda3d57..7b37434505 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -345,6 +345,8 @@ void ShareModel::handlePlaceholderLinkShare() } else if (!linkSharePresent && !placeholderLinkSharePresent && publicLinkSharesEnabled()) { slotAddShare(_placeholderLinkShare); } + + Q_EMIT sharesChanged(); } void ShareModel::slotPropfindReceived(const QVariantMap &result) @@ -402,7 +404,6 @@ void ShareModel::slotSharesFetched(const QList &shares) } handlePlaceholderLinkShare(); - Q_EMIT sharesChanged(); } void ShareModel::setupInternalLinkShare() @@ -479,7 +480,6 @@ void ShareModel::slotAddShare(const SharePtr &share) } handlePlaceholderLinkShare(); - Q_EMIT sharesChanged(); } void ShareModel::slotRemoveShareWithId(const QString &shareId) @@ -506,8 +506,6 @@ void ShareModel::slotRemoveShareWithId(const QString &shareId) endRemoveRows(); handlePlaceholderLinkShare(); - - Q_EMIT sharesChanged(); } void ShareModel::slotServerError(const int code, const QString &message)