From 9064f3ba4be6867b177a724ab56c637be717764e Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 11 Oct 2024 20:03:38 +0300 Subject: [PATCH] Fixed behavior of checkbox to remove background from QR in share QR box. --- Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp index 5b094a9e8..526b9700e 100644 --- a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp @@ -819,7 +819,9 @@ void FillPeerQrBox( box->verticalLayout(), tr::lng_qr_box_transparent_background(), st::settingsButtonNoIcon)); - backgroundToggle->toggleOn(state->backgroundToggled.value(), true); + backgroundToggle->toggleOn( + state->backgroundToggled.value() | rpl::map(!rpl::mappers::_1), + true); backgroundToggle->setClickedCallback([=] { state->backgroundToggled = !state->backgroundToggled.current(); });