Move sharesChanged signal emission to handlePlaceholderLinkShare rather than repeating each time this method is called

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-02-28 23:18:05 +01:00
parent f05e44a24a
commit 2e69a9c59a

View file

@ -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<SharePtr> &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)