2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move some settings to the main menu (support).

This commit is contained in:
John Preston
2018-10-09 16:32:32 +03:00
parent 3f1f070d3f
commit 81a9554caa
8 changed files with 30 additions and 35 deletions

View File

@@ -946,38 +946,6 @@ void SetupSupport(not_null<Ui::VerticalLayout*> container) {
});
AddSkip(inner, st::settingsCheckboxesSkip);
base::ObservableViewer(
inner->add(
object_ptr<Ui::Checkbox>(
inner,
"Fix chats order",
Auth().settings().supportFixChatsOrder(),
st::settingsSendType),
st::settingsSendTypePadding
)->checkedChanged
) | rpl::start_with_next([](bool fix) {
Auth().settings().setSupportFixChatsOrder(fix);
Local::writeUserSettings();
}, inner->lifetime());
AddSkip(inner, st::settingsCheckboxesSkip);
const auto subscription = Ui::AttachAsChild(inner, rpl::lifetime());
AddButton(
inner,
rpl::single(qsl("Reload templates")),
st::settingsButton
)->addClickHandler([=] {
*subscription = Auth().supportTemplates()->errors(
) | rpl::start_with_next([=](QStringList errors) {
Ui::Toast::Show(errors.isEmpty()
? "Templates reloaded!"
: ("Errors:\n\n" + errors.join("\n\n")));
});
Auth().supportTemplates()->reload();
});
AddSkip(inner);
}
Chat::Chat(QWidget *parent, not_null<UserData*> self)