app: Put the Placeholder inside the view

If there's more than one main item in the ScrollablePage, QtQuick gets
confused and the placeholder does not get displayed.

(cherry picked from commit e0a64f4a30)
This commit is contained in:
Aleix Pol 2024-03-05 21:50:45 +01:00 committed by Nicolas Fella
parent c5934e3d9b
commit 79246f2b1a

View file

@ -34,12 +34,6 @@ Kirigami.ScrollablePage
onTriggered: root.refreshing = false onTriggered: root.refreshing = false
} }
Kirigami.PlaceholderMessage {
text: i18nd("kdeconnect-app", "No devices found")
anchors.centerIn: parent
visible: devices.count === 0
}
ListView { ListView {
id: devices id: devices
section { section {
@ -59,6 +53,11 @@ Kirigami.ScrollablePage
} }
} }
} }
Kirigami.PlaceholderMessage {
text: i18nd("kdeconnect-app", "No devices found")
anchors.centerIn: parent
visible: devices.count === 0
}
model: DevicesSortProxyModel { model: DevicesSortProxyModel {
sourceModel: DevicesModel {} sourceModel: DevicesModel {}