mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Windows 8/8.1/10 toast notifications support added
This commit is contained in:
@@ -19,6 +19,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
#include "localstorage.h"
|
||||
|
||||
#include "mainwidget.h"
|
||||
#include "window.h"
|
||||
#include "lang.h"
|
||||
|
||||
namespace {
|
||||
@@ -737,6 +738,15 @@ namespace {
|
||||
cSetDesktopNotify(v == 1);
|
||||
} break;
|
||||
|
||||
case dbiWindowsNotifications: {
|
||||
qint32 v;
|
||||
stream >> v;
|
||||
if (!_checkStreamStatus(stream)) return false;
|
||||
|
||||
cSetWindowsNotifications(v == 1);
|
||||
cSetCustomNotifies((App::wnd() ? App::wnd()->psHasNativeNotifications() : true) && !cWindowsNotifications());
|
||||
} break;
|
||||
|
||||
case dbiWorkMode: {
|
||||
qint32 v;
|
||||
stream >> v;
|
||||
@@ -1269,7 +1279,7 @@ namespace {
|
||||
_writeMap(WriteMapFast);
|
||||
}
|
||||
|
||||
uint32 size = 12 * (sizeof(quint32) + sizeof(qint32));
|
||||
uint32 size = 13 * (sizeof(quint32) + sizeof(qint32));
|
||||
size += sizeof(quint32) + _stringSize(cAskDownloadPath() ? QString() : cDownloadPath());
|
||||
size += sizeof(quint32) + sizeof(qint32) + (cRecentEmojisPreload().isEmpty() ? cGetRecentEmojis().size() : cRecentEmojisPreload().size()) * (sizeof(uint64) + sizeof(ushort));
|
||||
size += sizeof(quint32) + sizeof(qint32) + cEmojiVariants().size() * (sizeof(uint32) + sizeof(uint64));
|
||||
@@ -1285,6 +1295,7 @@ namespace {
|
||||
data.stream << quint32(dbiSoundNotify) << qint32(cSoundNotify());
|
||||
data.stream << quint32(dbiDesktopNotify) << qint32(cDesktopNotify());
|
||||
data.stream << quint32(dbiNotifyView) << qint32(cNotifyView());
|
||||
data.stream << quint32(dbiWindowsNotifications) << qint32(cWindowsNotifications());
|
||||
data.stream << quint32(dbiAskDownloadPath) << qint32(cAskDownloadPath());
|
||||
data.stream << quint32(dbiDownloadPath) << (cAskDownloadPath() ? QString() : cDownloadPath());
|
||||
data.stream << quint32(dbiCompressPastedImage) << qint32(cCompressPastedImage());
|
||||
|
Reference in New Issue
Block a user