2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

New notifications API, defaults for users/chats.

This commit is contained in:
John Preston
2018-04-09 21:48:29 +04:00
parent 4b4e22d59d
commit 734c410879
32 changed files with 724 additions and 541 deletions

View File

@@ -224,7 +224,7 @@ History::History(const PeerId &peerId)
: Entry(this)
, peer(App::peer(peerId))
, cloudDraftTextCache(st::dialogsTextWidthMin)
, _mute(peer->isMuted())
, _mute(Auth().data().notifyIsMuted(peer))
, _sendActionText(st::dialogsTextWidthMin) {
if (const auto user = peer->asUser()) {
if (user->botInfo) {
@@ -2194,10 +2194,9 @@ void History::applyDialog(const MTPDdialog &data) {
}
}
}
App::main()->applyNotifySetting(
Auth().data().applyNotifySetting(
MTP_notifyPeer(data.vpeer),
data.vnotify_settings,
this);
data.vnotify_settings);
if (data.has_draft() && data.vdraft.type() == mtpc_draftMessage) {
Data::applyPeerCloudDraft(peer->id, data.vdraft.c_draftMessage());
}