2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add convenient appConfig().get<int>(..).

This commit is contained in:
John Preston
2022-08-02 12:40:55 +03:00
parent b96e09534d
commit 4915ea8ad3
8 changed files with 45 additions and 44 deletions

View File

@@ -540,8 +540,7 @@ rpl::producer<int> UniqueReactionsLimitValue(
const auto config = &session->account().appConfig();
return config->value(
) | rpl::map([=] {
return int(base::SafeRound(
config->get<double>("reactions_uniq_max", 11)));
return config->get<int>("reactions_uniq_max", 11);
}) | rpl::distinct_until_changed();
}