mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-12 06:33:59 +00:00
Merge tag 'v7.0.4' into dev
This commit is contained in:
@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/basic_click_handlers.h"
|
||||
#include "ui/emoji_config.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "platform/platform_specific.h"
|
||||
#include "boxes/url_auth_box.h"
|
||||
@@ -33,6 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_session_controller.h"
|
||||
#include "mainwindow.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "styles/style_chat_helpers.h"
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QLocale>
|
||||
@@ -251,14 +253,14 @@ Ui::Text::MarkedContext TextContext(TextContextArgs &&args) {
|
||||
? Factory([simple, loop = args.customEmojiLoopLimit](
|
||||
QStringView data,
|
||||
const Context &context) {
|
||||
return std::make_unique<Ui::Text::LimitedLoopsEmoji>(
|
||||
return MakeWrappedEmoji<Ui::Text::LimitedLoopsEmoji>(
|
||||
simple(data, context),
|
||||
loop);
|
||||
})
|
||||
: Factory([simple](
|
||||
QStringView data,
|
||||
const Context &context) {
|
||||
return std::make_unique<Ui::Text::FirstFrameEmoji>(
|
||||
return MakeWrappedEmoji<Ui::Text::FirstFrameEmoji>(
|
||||
simple(data, context));
|
||||
});
|
||||
args.details.session = session;
|
||||
@@ -451,9 +453,17 @@ bool UiIntegration::handleUrlClick(
|
||||
bool UiIntegration::copyPreOnClick(const QVariant &context) {
|
||||
const auto my = context.value<ClickHandlerContext>();
|
||||
if (const auto window = my.sessionWindow.get()) {
|
||||
window->showToast(tr::lng_code_copied(tr::now));
|
||||
window->showToast({
|
||||
.text = { tr::lng_code_copied(tr::now) },
|
||||
.iconLottie = u"toast/copy"_q,
|
||||
.iconLottieSize = st::toastLottieIconSize,
|
||||
});
|
||||
} else if (my.show) {
|
||||
my.show->showToast(tr::lng_code_copied(tr::now));
|
||||
my.show->showToast({
|
||||
.text = { tr::lng_code_copied(tr::now) },
|
||||
.iconLottie = u"toast/copy"_q,
|
||||
.iconLottieSize = st::toastLottieIconSize,
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user