Improve "No devices" warning

Summary:
Move the "No devices available" text in smsapp from combobox to the ConversationList.

P.S.
It's a GCI task.

Test Plan:
* Build and run smsapp
* Try pairing and unpairing the device
* See the difference

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16467
This commit is contained in:
Alex Kovrigin 2018-10-27 14:48:53 -06:00 committed by Simon Redman
parent b01652f54d
commit 4daf129cf3

View file

@ -32,7 +32,6 @@ Kirigami.ScrollablePage
footer: ComboBox {
id: devicesCombo
enabled: count > 0
displayText: enabled ? undefined : i18n("No devices available")
model: DevicesSortProxyModel {
id: devicesModel
//TODO: make it possible to sort only if they can do sms
@ -43,6 +42,12 @@ Kirigami.ScrollablePage
}
textRole: "display"
}
Label {
text: i18n("No devices available")
anchors.centerIn: parent
visible: !devicesCombo.enabled
}
readonly property QtObject device: devicesCombo.currentIndex >= 0 ? devicesModel.data(devicesModel.index(devicesCombo.currentIndex, 0), DevicesModel.DeviceRole) : null