Don't show connection notifications for unpaired devices
This commit is contained in:
parent
f2aff3c7ca
commit
003052093d
1 changed files with 9 additions and 6 deletions
|
@ -143,14 +143,17 @@ void Daemon::onNewDeviceLink(const NetworkPackage& identityPackage, DeviceLink*
|
||||||
Device* device = mDevices[id];
|
Device* device = mDevices[id];
|
||||||
device->addLink(dl);
|
device->addLink(dl);
|
||||||
|
|
||||||
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
if (device->paired()) {
|
||||||
notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48));
|
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48));
|
||||||
notification->setTitle(device->name());
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
||||||
notification->setText("Succesfully connected");
|
notification->setTitle(device->name());
|
||||||
notification->sendEvent();
|
notification->setText("Succesfully connected");
|
||||||
|
notification->sendEvent();
|
||||||
|
}
|
||||||
|
|
||||||
emit deviceStatusChanged(id);
|
emit deviceStatusChanged(id);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "It is a new device";
|
qDebug() << "It is a new device";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue