Merge tag 'v6.7.8' into dev

# Conflicts:
#	.github/workflows/mac_packaged.yml
#	Telegram/Resources/winrc/Telegram.rc
#	Telegram/Resources/winrc/Updater.rc
#	Telegram/SourceFiles/api/api_chat_invite.h
#	Telegram/SourceFiles/boxes/language_box.cpp
#	Telegram/SourceFiles/boxes/send_files_box.h
#	Telegram/SourceFiles/boxes/sticker_set_box.cpp
#	Telegram/SourceFiles/core/version.h
#	Telegram/SourceFiles/data/data_types.h
#	Telegram/SourceFiles/history/history_item.cpp
#	Telegram/SourceFiles/history/history_widget.cpp
#	Telegram/SourceFiles/history/view/history_view_chat_section.cpp
#	Telegram/SourceFiles/history/view/history_view_message.cpp
#	Telegram/SourceFiles/history/view/history_view_translate_bar.cpp
#	Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp
#	Telegram/SourceFiles/platform/mac/main_window_mac.mm
#	Telegram/SourceFiles/settings/sections/settings_main.cpp
#	Telegram/lib_ui
#	snap/snapcraft.yaml
This commit is contained in:
AlexeyZavar
2026-04-24 20:47:17 +03:00
308 changed files with 13057 additions and 2300 deletions
@@ -44,6 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_saved_messages.h"
#include "data/data_saved_sublist.h"
#include "data/data_session.h"
#include "data/data_thread.h"
#include "data/data_file_origin.h"
#include "data/data_flags.h"
#include "data/data_folder.h"
@@ -118,6 +119,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "settings/cloud_password/settings_cloud_password_start.h"
#include "settings/cloud_password/settings_cloud_password_email_confirm.h"
#include "settings/sections/settings_main.h"
#include "styles/style_chat.h"
#include "settings/sections/settings_premium.h"
#include "settings/sections/settings_privacy_security.h"
#include "styles/style_window.h"
@@ -1879,6 +1881,10 @@ void SessionController::init() {
if (session().supportMode()) {
session().supportHelper().registerWindow(this);
}
session().data().drawToReplyRequests(
) | rpl::on_next([=](Data::DrawToReplyRequest request) {
handleDrawToReplyRequest(std::move(request));
}, lifetime());
setupShortcuts();
}
@@ -2723,6 +2729,7 @@ void SessionController::showCalendar(ShowCalendarDescriptor &&descriptor) {
const auto chat = descriptor.chat;
const auto requestedDate = descriptor.date;
const auto topic = chat.topic();
const auto sublist = chat.sublist();
const auto history = chat.owningHistory();
if (!history) {
return;
@@ -2796,6 +2803,7 @@ void SessionController::showCalendar(ShowCalendarDescriptor &&descriptor) {
: !currentPeerDate.isNull()
? currentPeerDate
: QDate::currentDate();
const auto performJump = descriptor.customJump;
struct ButtonState {
enum class Type {
None,
@@ -2889,32 +2897,34 @@ void SessionController::showCalendar(ShowCalendarDescriptor &&descriptor) {
const auto date = base::unixtime::serialize(
QDateTime(d, QTime()));
if (const auto msgId = search->resolveMsgIdByDate(date)) {
performJump(*msgId, close);
performJump(FullMsgId(history->peer->id, *msgId), close);
}
};
}
return { Factory(factory), std::move(customJump) };
}();
const auto weak = base::make_weak(this);
const auto weakTopic = base::make_weak(topic);
const auto weakThread = base::make_weak(chat.thread());
const auto jump = [=](const QDate &date, Fn<void()> close) {
const auto open = [=](not_null<PeerData*> peer, MsgId id) {
if (const auto strong = weak.get()) {
if (!topic) {
if (performJump) {
performJump(FullMsgId(peer->id, id), close);
} else if (!topic && !sublist) {
strong->showPeerHistory(
peer,
SectionShow::Way::Forward,
id);
} else if (const auto strongTopic = weakTopic.get()) {
strong->showTopic(
strongTopic,
} else if (const auto strongThread = weakThread.get()) {
strong->showThread(
strongThread,
id,
SectionShow::Way::Forward);
strong->hideLayer(anim::type::normal);
}
}
};
if (!topic || weakTopic) {
if ((!topic && !sublist) || weakThread) {
session().api().resolveJumpToDate(chat, date, open);
}
};