fix: simpleQuotesAndReplies

This commit is contained in:
ZavaruKitsu 2023-12-26 12:08:29 +03:00
parent 1a279c4409
commit 0eab40b22f
3 changed files with 16 additions and 4 deletions

View file

@ -494,7 +494,7 @@ void PeerBubbleListPart::draw(
geometry.x(),
geometry.y(),
width(),
&cache->bg);
&cache->bg2);
if (peer.ripple->empty()) {
peer.ripple = nullptr;
}

View file

@ -31,6 +31,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/text_utilities.h"
#include "styles/style_chat.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace HistoryView {
namespace {
@ -603,7 +607,9 @@ void WebPage::draw(Painter &p, const PaintContext &context) const {
: nullptr;
Ui::Text::ValidateQuotePaintCache(*cache, _st);
Ui::Text::FillQuotePaint(p, outer, *cache, _st);
if (backgroundEmoji) {
const auto settings = &AyuSettings::getInstance();
if (!settings->simpleQuotesAndReplies && backgroundEmoji) {
ValidateBackgroundEmoji(
backgroundEmojiId,
backgroundEmoji,

View file

@ -26,6 +26,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_chat.h"
#include "styles/style_media_view.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Media::Stories {
RepostView::RepostView(
@ -95,7 +99,9 @@ void RepostView::draw(Painter &p, int x, int y, int availableWidth) {
cache->bg = QColor(0, 0, 0, 64);
Ui::Text::ValidateQuotePaintCache(*cache, quoteSt);
Ui::Text::FillQuotePaint(p, rect, *cache, quoteSt);
if (backgroundEmoji) {
const auto settings = &AyuSettings::getInstance();
if (!settings->simpleQuotesAndReplies && backgroundEmoji) {
using namespace HistoryView;
if (backgroundEmoji->firstFrameMask.isNull()
&& !backgroundEmoji->emoji) {
@ -121,7 +127,7 @@ void RepostView::draw(Painter &p, int x, int y, int availableWidth) {
cache->bg = rippleColor;
if (_ripple) {
_ripple->paint(p, x, y, w, &rippleColor);
_ripple->paint(p, x, y, w, &cache->bg2);
if (_ripple->empty()) {
_ripple.reset();
}