diff --git a/src/gui/macOS/ui/FileProviderEvictionDialog.qml b/src/gui/macOS/ui/FileProviderEvictionDialog.qml index 15e4a2da82f4b..5884b63770a9b 100644 --- a/src/gui/macOS/ui/FileProviderEvictionDialog.qml +++ b/src/gui/macOS/ui/FileProviderEvictionDialog.qml @@ -39,6 +39,7 @@ ApplicationWindow { delegate: FileProviderFileDelegate { width: parent.width height: 60 + onEvictItem: root.materialisedItemsModel.evictItem(identifier, domainIdentifier) } } } diff --git a/src/gui/macOS/ui/FileProviderFileDelegate.qml b/src/gui/macOS/ui/FileProviderFileDelegate.qml index 48b6acf4987be..533bb70469feb 100644 --- a/src/gui/macOS/ui/FileProviderFileDelegate.qml +++ b/src/gui/macOS/ui/FileProviderFileDelegate.qml @@ -25,7 +25,11 @@ import com.nextcloud.desktopclient 1.0 Item { id: root + signal evictItem(string identifier, string domainIdentifier) + // Match with model rolenames for automagic setting of properties + required property string identifier + required property string domainIdentifier required property string fileName required property string userVisiblePath required property string fileType @@ -78,6 +82,7 @@ Item { text: qsTr("Delete") bgColor: Style.errorBoxBackgroundColor + onClicked: root.evictItem(root.identifier, root.domainIdentifier) } EnforcedPlainTextLabel {