Merge pull request #5379 from nextcloud/bugfix/file-details-for-all-valid-files

Fix displaying of file details button for local syncfileitem activities
This commit is contained in:
Claudio Cambra 2023-01-31 15:08:55 +01:00 committed by GitHub
commit 306c01bfce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -341,11 +341,11 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
case DisplayActions:
return _displayActions;
case ShowFileDetailsRole:
return !data(index, PathRole).toString().isEmpty() &&
return _displayActions &&
a._objectType == QStringLiteral("files") &&
_displayActions &&
a._fileAction != "file_deleted" &&
a._syncFileItemStatus != SyncFileItem::FileIgnored;
a._syncFileItemStatus != SyncFileItem::FileIgnored &&
!data(index, OpenablePathRole).toString().isEmpty();
case DismissableRole:
// Do not allow dismissal of things requiring user input regarding syncing
return !a._links.isEmpty() &&

View file

@ -658,6 +658,7 @@ void User::processCompletedSyncItem(const Folder *folder, const SyncFileItemPtr
Activity activity;
activity._type = Activity::SyncFileItemType; //client activity
activity._objectType = QStringLiteral("files");
activity._syncFileItemStatus = item->_status;
activity._dateTime = QDateTime::currentDateTime();
activity._message = item->_originalFile;