mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Sharing: add the shareWithAdditionalInfo
string in autocompletion results
Issue #6749
This commit is contained in:
parent
380d7b8028
commit
ec8c02dad0
1 changed files with 5 additions and 1 deletions
|
@ -125,9 +125,13 @@ void ShareeModel::shareesFetched(const QJsonDocument &reply)
|
|||
|
||||
QSharedPointer<Sharee> ShareeModel::parseSharee(const QJsonObject &data)
|
||||
{
|
||||
const QString displayName = data.value("label").toString();
|
||||
QString displayName = data.value("label").toString();
|
||||
const QString shareWith = data.value("value").toObject().value("shareWith").toString();
|
||||
Sharee::Type type = (Sharee::Type)data.value("value").toObject().value("shareType").toInt();
|
||||
const QString additionalInfo = data.value("value").toObject().value("shareWithAdditionalInfo").toString();
|
||||
if (!additionalInfo.isEmpty()) {
|
||||
displayName = tr("%1 (%2)", "sharee (shareWithAdditionalInfo)").arg(displayName, additionalInfo);
|
||||
}
|
||||
|
||||
return QSharedPointer<Sharee>(new Sharee(shareWith, displayName, type));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue