Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/gui/socketapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,11 @@ private slots:
auto shareName = SocketApi::tr("Context menu share");

// If shares will expire, create a new one every day.
QDate expireDate;
if (_account->capabilities().sharePublicLinkDefaultExpire()) {
shareName = SocketApi::tr("Context menu share %1").arg(QDate::currentDate().toString(Qt::ISODate));
expireDate = QDate::currentDate().addDays(
_account->capabilities().sharePublicLinkDefaultExpireDateDays());
}

// If there already is a context menu share, reuse it
Expand All @@ -540,7 +543,8 @@ private slots:

// otherwise create a new one
qCDebug(lcPublicLink) << "Creating new share";
_shareManager.createLinkShare(_localFile, shareName);
QString noPassword;
_shareManager.createLinkShare(_localFile, shareName, noPassword, expireDate);
}

void linkShareCreated(const QSharedPointer<LinkShare> &share)
Expand Down