fix(Notifications/Notification): remove binding loop

This commit is contained in:
Ronan Abhamon 2016-11-16 13:45:32 +01:00
parent 91ef7469d0
commit 91bb74c218
2 changed files with 11 additions and 4 deletions

View file

@ -106,7 +106,10 @@ void Notifier::showCallMessage (
m_mutex.unlock();
// Display notification.
QMetaObject::invokeMethod(object, "show", Qt::DirectConnection);
QMetaObject::invokeMethod(
object, NOTIFICATION_SHOW_METHOD_NAME,
Qt::DirectConnection
);
// Destroy it after timeout.
QTimer::singleShot(timeout, this, [object,this]() {

View file

@ -35,9 +35,13 @@ DesktopPopup {
window.y = Qt.binding(function () {
var screen = window.Screen
return screen != null
? screen.desktopAvailableHeight - window.height - notificationOffset
: 0
if (screen == null) {
return 0
}
var height = screen.desktopAvailableHeight - window.height
return height - notificationOffset % height
})
}
}