Skip to content

Commit

Permalink
Don't change notification sound to empty on mute.
Browse files Browse the repository at this point in the history
If notifications are muted no one from official apps play sound.
So there is no need to turn the sound off, otherwise if you enable
the notifications from a different app the sound stays off.

Enable the sound (change to "default") when turning notifications on.
  • Loading branch information
john-preston committed Apr 15, 2017
1 parent 4fc2c18 commit e3aacc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/mainwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4016,7 +4016,9 @@ void MainWidget::updateNotifySetting(PeerData *peer, NotifySettingStatus notify,
}
if (peer->notify != EmptyNotifySettings && peer->notify != UnknownNotifySettings) {
if (notify != NotifySettingDontChange) {
peer->notify->sound = (notify == NotifySettingSetMuted) ? "" : "default";
if ((notify != NotifySettingSetMuted) && peer->notify->sound.isEmpty()) {
peer->notify->sound = qsl("default");
}
peer->notify->mute = (notify == NotifySettingSetMuted) ? (unixtime() + muteFor) : 0;
}
if (silent == SilentNotifiesSetSilent) {
Expand Down

0 comments on commit e3aacc8

Please sign in to comment.