2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

enabled custom notifies in os x 10.7, added content image in os x native notifiers

This commit is contained in:
John Preston
2015-01-28 16:14:43 +03:00
parent 75a47e98c3
commit 61da0ff829
6 changed files with 23 additions and 13 deletions

View File

@@ -480,8 +480,10 @@ void PsMainWindow::psNotifyShown(NotifyWindow *w) {
void PsMainWindow::psPlatformNotify(HistoryItem *item) {
QString title = (cNotifyView() <= dbinvShowName) ? item->history()->peer->name : qsl("Telegram Desktop");
QString subtitle = (cNotifyView() <= dbinvShowName) ? item->notificationHeader() : QString();
QPixmap pix = (cNotifyView() <= dbinvShowName) ? item->history()->peer->photo->pix(st::notifyMacPhotoSize) : QPixmap();
QString msg = (cNotifyView() <= dbinvShowPreview) ? item->notificationText() : lang(lng_notification_preview);
_private.showNotify(item->history()->peer->id, title, subtitle, msg, (cNotifyView() <= dbinvShowPreview));
_private.showNotify(item->history()->peer->id, pix, title, subtitle, msg, (cNotifyView() <= dbinvShowPreview));
}
bool PsMainWindow::eventFilter(QObject *obj, QEvent *evt) {