more fixes
This commit is contained in:
parent
01b47fd6a7
commit
7fc91d819e
|
@ -37,7 +37,7 @@ int Notification::notificationMetaID = qRegisterMetaType<Notification>();
|
|||
uint Notification::notificationCount = 0;
|
||||
|
||||
|
||||
uint Notification::m_idCount;
|
||||
uint Notification::m_idCount = 1;
|
||||
|
||||
|
||||
int Notification::DefaultTimeout = 10;
|
||||
|
|
|
@ -70,7 +70,11 @@ public:
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(notificationID == 0)
|
||||
{
|
||||
qDebug() << "Snarl notification already closed" << msg->lParam;
|
||||
return true;
|
||||
}
|
||||
Notification notification = m_snarl->snore()->getActiveNotificationByID(notificationID);
|
||||
qDebug()<<"recived a Snarl callback id:"<<notificationID<< "|" << msg->lParam <<"action:"<<action<<"data:"<<data;
|
||||
NotificationEnums::CloseReasons::closeReasons reason = NotificationEnums::CloseReasons::NONE;
|
||||
|
@ -216,6 +220,7 @@ void SnarlBackend::slotNotify(Notification notification){
|
|||
snarlInterface->AddAction(id,a->name.toUtf8().constData(),QString("@").append(QString::number(a->id)).toUtf8().constData());
|
||||
}
|
||||
m_idMap[notification.id()] = id;
|
||||
qDebug() << "snarl" << id << notification.id();
|
||||
startTimeout(notification.id(),notification.timeout());
|
||||
|
||||
}else{
|
||||
|
@ -228,6 +233,8 @@ void SnarlBackend::slotNotify(Notification notification){
|
|||
notification.icon().isLocalFile()?notification.icon().localUrl().toUtf8().constData():0,
|
||||
!notification.icon().isLocalFile()?notification.icon().imageData().toBase64().constData():0,
|
||||
priority);
|
||||
m_idMap[notification.id()] = m_idMap[notification.updateID()];
|
||||
qDebug() << "snarl update" << m_idMap[notification.updateID()] << notification.id();
|
||||
startTimeout(notification.updateID(),notification.timeout());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue