Merge tag 'v4.15.0' into dev

# Conflicts:
#	Telegram/Resources/winrc/Telegram.rc
#	Telegram/Resources/winrc/Updater.rc
#	Telegram/SourceFiles/core/version.h
#	Telegram/SourceFiles/dialogs/dialogs_row.cpp
#	Telegram/SourceFiles/dialogs/dialogs_widget.cpp
#	Telegram/SourceFiles/history/view/history_view_message.cpp
#	Telegram/SourceFiles/info/profile/info_profile_actions.cpp
#	Telegram/lib_ui
#	snap/snapcraft.yaml
This commit is contained in:
ZavaruKitsu
2024-02-18 21:37:55 +03:00
200 changed files with 3605 additions and 1270 deletions
+15 -8
View File
@@ -245,6 +245,12 @@ Session::Session(not_null<Main::Session*> session)
, _bigFileCache(Core::App().databases().get(
_session->local().cacheBigFilePath(),
_session->local().cacheBigFileSettings()))
, _groupFreeTranscribeLevel(session->account().appConfig().value(
) | rpl::map([=] {
return session->account().appConfig().get<int>(
u"group_transcribe_level_min"_q,
6);
}))
, _chatsList(
session,
FilterId(),
@@ -2189,8 +2195,7 @@ rpl::producer<int> Session::maxPinnedChatsLimitValue(
// We always use premium limit in the MainList limit producer,
// because it slices the list to that limit. We don't want to slice
// premium-ly added chats from the pinned list because of sync issues.
return rpl::single(rpl::empty_value()) | rpl::then(
_session->account().appConfig().refreshed()
return _session->account().appConfig().value(
) | rpl::map([=] {
const auto limits = Data::PremiumLimits(_session);
return folder
@@ -2205,8 +2210,7 @@ rpl::producer<int> Session::maxPinnedChatsLimitValue(
// We always use premium limit in the MainList limit producer,
// because it slices the list to that limit. We don't want to slice
// premium-ly added chats from the pinned list because of sync issues.
return rpl::single(rpl::empty_value()) | rpl::then(
_session->account().appConfig().refreshed()
return _session->account().appConfig().value(
) | rpl::map([=] {
const auto limits = Data::PremiumLimits(_session);
return limits.dialogFiltersChatsPremium();
@@ -2215,8 +2219,7 @@ rpl::producer<int> Session::maxPinnedChatsLimitValue(
rpl::producer<int> Session::maxPinnedChatsLimitValue(
not_null<Data::Forum*> forum) const {
return rpl::single(rpl::empty_value()) | rpl::then(
_session->account().appConfig().refreshed()
return _session->account().appConfig().value(
) | rpl::map([=] {
const auto limits = Data::PremiumLimits(_session);
return limits.topicsPinnedCurrent();
@@ -2229,14 +2232,17 @@ rpl::producer<int> Session::maxPinnedChatsLimitValue(
// We always use premium limit in the MainList limit producer,
// because it slices the list to that limit. We don't want to slice
// premium-ly added chats from the pinned list because of sync issues.
return rpl::single(rpl::empty_value()) | rpl::then(
_session->account().appConfig().refreshed()
return _session->account().appConfig().value(
) | rpl::map([=] {
const auto limits = Data::PremiumLimits(_session);
return limits.savedSublistsPinnedPremium();
});
}
int Session::groupFreeTranscribeLevel() const {
return _groupFreeTranscribeLevel.current();
}
const std::vector<Dialogs::Key> &Session::pinnedChatsOrder(
Data::Folder *folder) const {
return chatsList(folder)->pinned()->order();
@@ -4518,6 +4524,7 @@ void Session::insertCheckedServiceNotification(
MTP_flags(flags),
MTP_int(0), // Not used (would've been trimmed to 32 bits).
peerToMTP(PeerData::kServiceNotificationsId),
MTPint(), // from_boosts_applied
peerToMTP(PeerData::kServiceNotificationsId),
MTPPeer(), // saved_peer_id
MTPMessageFwdHeader(),