mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added public api for sound configuration to data notify settings.
This commit is contained in:
@@ -230,15 +230,16 @@ void FillMuteMenu(
|
||||
Args args) {
|
||||
const auto peer = args.peer;
|
||||
|
||||
const auto soundIsNone = peer->owner().notifySettings().soundIsNone(peer);
|
||||
const auto soundIsNone = peer->owner().notifySettings().sound(peer).none;
|
||||
menu->addAction(
|
||||
soundIsNone
|
||||
? tr::lng_mute_menu_sound_on(tr::now)
|
||||
: tr::lng_mute_menu_sound_off(tr::now),
|
||||
[=] {
|
||||
auto ¬ifySettings = peer->owner().notifySettings();
|
||||
const auto soundIsNone = notifySettings.soundIsNone(peer);
|
||||
notifySettings.updateNotifySettings(peer, {}, {}, !soundIsNone);
|
||||
auto sound = notifySettings.sound(peer);
|
||||
sound.none = !sound.none;
|
||||
notifySettings.updateNotifySettings(peer, {}, {}, sound);
|
||||
},
|
||||
soundIsNone ? &st::menuIconSoundOn : &st::menuIconSoundOff);
|
||||
|
||||
|
Reference in New Issue
Block a user