2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Added initial ability to configure notification sound.

This commit is contained in:
23rd
2022-04-05 00:00:58 +03:00
parent 1c9b1ea69f
commit c04a0e42a7
10 changed files with 278 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "menu/menu_mute.h"
#include "boxes/ringtones_box.h"
#include "data/data_peer.h"
#include "data/data_session.h"
#include "data/notify/data_notify_settings.h"
@@ -230,6 +231,11 @@ void FillMuteMenu(
Args args) {
const auto peer = args.peer;
menu->addAction(
tr::lng_mute_menu_sound_select(tr::now),
[=, show = args.show] { show->showBox(Box(RingtonesBox, peer)); },
&st::menuIconSoundSelect);
const auto soundIsNone = peer->owner().notifySettings().sound(peer).none;
menu->addAction(
soundIsNone