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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user