Set invalid filename dialog mode in activity list model

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-08-20 16:22:49 +08:00 committed by Matthieu Gallien
parent aaf06535d2
commit 598f2c95f5

View file

@ -729,9 +729,12 @@ void ActivityListModel::slotTriggerDefaultAction(const int activityIndex)
const auto fileLocation = activity._syncFileItemStatus == SyncFileItem::FileNameInvalidOnServer
? InvalidFilenameDialog::FileLocation::NewLocalFile
: InvalidFilenameDialog::FileLocation::Default;
const auto invalidMode = activity._syncFileItemStatus == SyncFileItem::FileNameInvalidOnServer
? InvalidFilenameDialog::InvalidMode::ServerInvalid
: InvalidFilenameDialog::InvalidMode::SystemInvalid;
_currentInvalidFilenameDialog = new InvalidFilenameDialog(_accountState->account(), folder,
folderDir.filePath(activity._file), fileLocation);
folderDir.filePath(activity._file), fileLocation, invalidMode);
connect(_currentInvalidFilenameDialog, &InvalidFilenameDialog::accepted, folder, [folder]() {
folder->scheduleThisFolderSoon();
});