Fixed behavior of checkbox to remove background from QR in share QR box.

This commit is contained in:
23rd 2024-10-11 20:03:38 +03:00 committed by John Preston
parent e00e562b5f
commit 9064f3ba4b

View file

@ -819,7 +819,9 @@ void FillPeerQrBox(
box->verticalLayout(), box->verticalLayout(),
tr::lng_qr_box_transparent_background(), tr::lng_qr_box_transparent_background(),
st::settingsButtonNoIcon)); st::settingsButtonNoIcon));
backgroundToggle->toggleOn(state->backgroundToggled.value(), true); backgroundToggle->toggleOn(
state->backgroundToggled.value() | rpl::map(!rpl::mappers::_1),
true);
backgroundToggle->setClickedCallback([=] { backgroundToggle->setClickedCallback([=] {
state->backgroundToggled = !state->backgroundToggled.current(); state->backgroundToggled = !state->backgroundToggled.current();
}); });