mirror of https://github.com/procxx/kepka.git
				
				
				
			
							parent
							
								
									1f16d72667
								
							
						
					
					
						commit
						9e3fa2e4bc
					
				| 
						 | 
					@ -118,7 +118,7 @@ NotificationData::NotificationData(
 | 
				
			||||||
			kInterface.utf16(),
 | 
								kInterface.utf16(),
 | 
				
			||||||
			qsl("ActionInvoked"),
 | 
								qsl("ActionInvoked"),
 | 
				
			||||||
			this,
 | 
								this,
 | 
				
			||||||
			SLOT(notificationClicked(uint)));
 | 
								SLOT(notificationClicked(uint,QString)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (capabilities.contains(qsl("inline-reply"))) {
 | 
							if (capabilities.contains(qsl("inline-reply"))) {
 | 
				
			||||||
			_actions << qsl("inline-reply")
 | 
								_actions << qsl("inline-reply")
 | 
				
			||||||
| 
						 | 
					@ -261,14 +261,20 @@ void NotificationData::notificationClosed(uint id) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void NotificationData::notificationClicked(uint id) {
 | 
					void NotificationData::notificationClicked(uint id, const QString &actionId) {
 | 
				
			||||||
	if (id == _notificationId) {
 | 
						if (id != _notificationId) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (actionId != qsl("default") && actionId != qsl("mail-reply-sender")) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const auto manager = _manager;
 | 
						const auto manager = _manager;
 | 
				
			||||||
	crl::on_main(manager, [=] {
 | 
						crl::on_main(manager, [=] {
 | 
				
			||||||
		manager->notificationActivated(_peerId, _msgId);
 | 
							manager->notificationActivated(_peerId, _msgId);
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void NotificationData::notificationReplied(uint id, const QString &text) {
 | 
					void NotificationData::notificationReplied(uint id, const QString &text) {
 | 
				
			||||||
	if (id == _notificationId) {
 | 
						if (id == _notificationId) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private slots:
 | 
					private slots:
 | 
				
			||||||
	void notificationClosed(uint id);
 | 
						void notificationClosed(uint id);
 | 
				
			||||||
	void notificationClicked(uint id);
 | 
						void notificationClicked(uint id, const QString &actionId);
 | 
				
			||||||
	void notificationReplied(uint id, const QString &text);
 | 
						void notificationReplied(uint id, const QString &text);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue