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

Add session->appConfig() shortcut.

This commit is contained in:
John Preston
2024-03-29 15:30:50 +04:00
parent 3b5814edae
commit da7a796edb
35 changed files with 98 additions and 115 deletions

View File

@@ -10,7 +10,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "history/history_item.h"
#include "main/main_session.h"
#include "main/main_account.h"
#include "main/main_app_config.h"
#include "main/session/send_as_peers.h"
#include "data/data_user.h"
@@ -100,7 +99,7 @@ constexpr auto kTopReactionsLimit = 14;
[[nodiscard]] int SentReactionsLimit(not_null<HistoryItem*> item) {
const auto session = &item->history()->session();
const auto config = &session->account().appConfig();
const auto config = &session->appConfig();
return session->premium()
? config->get<int>("reactions_user_max_premium", 3)
: config->get<int>("reactions_user_max_default", 1);