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:
parent
b01652f54d
commit
4daf129cf3
1 changed files with 6 additions and 1 deletions
|
@ -32,7 +32,6 @@ Kirigami.ScrollablePage
|
||||||
footer: ComboBox {
|
footer: ComboBox {
|
||||||
id: devicesCombo
|
id: devicesCombo
|
||||||
enabled: count > 0
|
enabled: count > 0
|
||||||
displayText: enabled ? undefined : i18n("No devices available")
|
|
||||||
model: DevicesSortProxyModel {
|
model: DevicesSortProxyModel {
|
||||||
id: devicesModel
|
id: devicesModel
|
||||||
//TODO: make it possible to sort only if they can do sms
|
//TODO: make it possible to sort only if they can do sms
|
||||||
|
@ -44,6 +43,12 @@ Kirigami.ScrollablePage
|
||||||
textRole: "display"
|
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
|
readonly property QtObject device: devicesCombo.currentIndex >= 0 ? devicesModel.data(devicesModel.index(devicesCombo.currentIndex, 0), DevicesModel.DeviceRole) : null
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
Loading…
Reference in a new issue