Url auth checkboxes checked by default.

This commit is contained in:
John Preston 2019-05-25 16:44:15 +02:00
parent 87caa58456
commit 01054858a4
1 changed files with 4 additions and 1 deletions

View File

@ -157,7 +157,7 @@ not_null<Ui::RpWidget*> UrlAuthBox::setupContent(
object_ptr<Ui::Checkbox>(
result,
QString(),
false,
true,
st::urlAuthCheckbox),
style::margins(
st::boxPadding.left(),
@ -187,6 +187,9 @@ not_null<Ui::RpWidget*> UrlAuthBox::setupContent(
) | rpl::then(
auth->checkedChanges()
) | rpl::start_with_next([=](bool checked) {
if (!checked) {
allow->setChecked(false);
}
allow->setDisabled(!checked);
}, auth->lifetime());
}