Allow instant template selection (support).

This commit is contained in:
John Preston
2018-10-11 14:17:51 +03:00
parent ec49ff31ef
commit e896971fa4
9 changed files with 198 additions and 62 deletions
@@ -946,6 +946,23 @@ void SetupSupport(not_null<Ui::VerticalLayout*> container) {
});
AddSkip(inner, st::settingsCheckboxesSkip);
base::ObservableViewer(
inner->add(
object_ptr<Ui::Checkbox>(
inner,
"Enable templates autocomplete",
Auth().settings().supportTemplatesAutocomplete(),
st::settingsCheckbox),
st::settingsSendTypePadding
)->checkedChanged
) | rpl::start_with_next([=](bool checked) {
Auth().settings().setSupportTemplatesAutocomplete(checked);
Local::writeUserSettings();
}, inner->lifetime());
AddSkip(inner, st::settingsCheckboxesSkip);
AddSkip(inner);
}
Chat::Chat(QWidget *parent, not_null<UserData*> self)