From 4daf129cf3fe180d813f62fcdac8a5d2517111c6 Mon Sep 17 00:00:00 2001 From: Alex Kovrigin Date: Sat, 27 Oct 2018 14:48:53 -0600 Subject: [PATCH] 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 --- smsapp/qml/ConversationList.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/smsapp/qml/ConversationList.qml b/smsapp/qml/ConversationList.qml index ac79e0162..a5e51879b 100644 --- a/smsapp/qml/ConversationList.qml +++ b/smsapp/qml/ConversationList.qml @@ -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