mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Notify settings unknown => draw chats as muted.
Also request common notify settings at the app launch.
This commit is contained in:
parent
472a677bca
commit
75a40b83ae
3 changed files with 5 additions and 5 deletions
|
@ -1741,7 +1741,7 @@ bool Session::notifyIsMuted(
|
|||
if (const auto until = settings.muteUntil()) {
|
||||
return resultFromUntil(*until);
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Session::notifySilentPosts(not_null<const PeerData*> peer) const {
|
||||
|
|
|
@ -2198,9 +2198,6 @@ void History::applyDialog(const MTPDdialog &data) {
|
|||
MTP_notifyPeer(data.vpeer),
|
||||
data.vnotify_settings);
|
||||
|
||||
// Request default notification settings for this type of chat.
|
||||
Auth().data().requestNotifySettings(peer);
|
||||
|
||||
if (data.has_draft() && data.vdraft.type() == mtpc_draftMessage) {
|
||||
Data::applyPeerCloudDraft(peer->id, data.vdraft.c_draftMessage());
|
||||
}
|
||||
|
|
|
@ -3700,6 +3700,9 @@ void MainWidget::mtpPing() {
|
|||
}
|
||||
|
||||
void MainWidget::start(const MTPUser *self) {
|
||||
Auth().api().requestNotifySettings(MTP_inputNotifyUsers());
|
||||
Auth().api().requestNotifySettings(MTP_inputNotifyChats());
|
||||
|
||||
if (!self) {
|
||||
MTP::send(MTPusers_GetFullUser(MTP_inputUserSelf()), rpcDone(&MainWidget::startWithSelf));
|
||||
return;
|
||||
|
@ -3713,7 +3716,7 @@ void MainWidget::start(const MTPUser *self) {
|
|||
|
||||
Local::readSavedPeers();
|
||||
cSetOtherOnline(0);
|
||||
if (auto user = App::feedUsers(MTP_vector<MTPUser>(1, *self))) {
|
||||
if (const auto user = App::feedUsers(MTP_vector<MTPUser>(1, *self))) {
|
||||
user->loadUserpic();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue