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

Allow disabling calls on tdesktop device.

This commit is contained in:
John Preston
2021-01-26 15:58:30 +04:00
parent ce5c19dfe9
commit 7da224d725
6 changed files with 52 additions and 13 deletions

View File

@@ -275,6 +275,19 @@ void Calls::setupContent() {
//)->addClickHandler([] {
// Ui::show(ChooseAudioBackendBox());
//});
AddButton(
content,
tr::lng_settings_call_accept_calls(),
st::settingsButton
)->toggleOn(rpl::single(
!settings.disableCalls()
))->toggledChanges(
) | rpl::filter([&settings](bool value) {
return (settings.disableCalls() == value);
}) | rpl::start_with_next([=](bool value) {
Core::App().settings().setDisableCalls(!value);
Core::App().saveSettingsDelayed();
}, content->lifetime());
AddButton(
content,
tr::lng_settings_call_open_system_prefs(),
@@ -286,6 +299,7 @@ void Calls::setupContent() {
Ui::show(Box<InformBox>(tr::lng_linux_no_audio_prefs(tr::now)));
}
});
AddSkip(content);
Ui::ResizeFitChild(this, content);