Skip to content

Commit 664a80c

Browse files
committed
Clicking on file name clash activities now opens file in web UI were the clash can be resolved
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
1 parent 6fa2542 commit 664a80c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/gui/tray/activitylistmodel.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,22 @@ void ActivityListModel::slotTriggerDefaultAction(const int activityIndex)
811811
_currentInvalidFilenameDialog->open();
812812
ownCloudGui::raiseDialog(_currentInvalidFilenameDialog);
813813
return;
814+
} else if (activity._status == SyncFileItem::FileNameClash) {
815+
const auto folder = FolderMan::instance()->folder(activity._folder);
816+
const auto relPath = activity._fileAction == QStringLiteral("file_renamed") ? activity._renamedFile : activity._file;
817+
SyncJournalFileRecord record;
818+
819+
if (!folder || !folder->journalDb()->getFileRecord(relPath, &record)) {
820+
return;
821+
}
822+
823+
fetchPrivateLinkUrl(folder->accountState()->account(),
824+
relPath,
825+
record.numericFileId(),
826+
this,
827+
[](const QString &link) { Utility::openBrowser(link); }
828+
);
829+
return;
814830
}
815831

816832
if (!path.isEmpty()) {

0 commit comments

Comments
 (0)