From a5ca5c10296a28b4aa6dd2d3b895ca2013150bf2 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 3 Jul 2013 15:16:08 +1000 Subject: [PATCH] Update RAOP notification to cater for new Notification Center behaviour. The "New" notification type define how the notification will appear on screen, it can't be changed once open. So we must always send a MythMediaNotification as our first notification. --- mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp | 6 ++++-- mythtv/libs/libmythtv/AirPlay/mythraopconnection.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp index 4be106adfc1..595b5f1698f 100644 --- a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp +++ b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp @@ -82,7 +82,8 @@ MythRAOPConnection::MythRAOPConnection(QObject *parent, QTcpSocket *socket, m_masterTimeStamp(0), m_deviceTimeStamp(0), m_networkLatency(0), m_clockSkew(0), m_audioTimer(NULL), - m_progressStart(0), m_progressCurrent(0), m_progressEnd(0) + m_progressStart(0), m_progressCurrent(0), m_progressEnd(0), + m_firstsend(false) { m_id = MythUINotificationCenter::GetInstance()->Register(this); } @@ -1771,7 +1772,7 @@ void MythRAOPConnection::SendNotification(bool update) MythNotification *n; - if (!update) + if (!update || !m_firstsend) { n = new MythMediaNotification(MythNotification::New, image, m_dmap, duration, position); @@ -1784,5 +1785,6 @@ void MythRAOPConnection::SendNotification(bool update) n->SetId(m_id); n->SetParent(this); MythUINotificationCenter::GetInstance()->Queue(*n); + m_firstsend = true; delete n; } diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h index e113b6886d8..4d021d47c84 100644 --- a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h +++ b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h @@ -189,6 +189,7 @@ class MTV_PUBLIC MythRAOPConnection : public QObject // Notification Center registration Id int m_id; + bool m_firstsend; private slots: void ProcessAudio(void);