mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Fixed unpaused custom emoji in top bar of sponsored messages.
This commit is contained in:
parent
3e13186560
commit
835fa77964
1 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/effects/animation_value.h"
|
#include "ui/effects/animation_value.h"
|
||||||
#include "ui/effects/ripple_animation.h"
|
#include "ui/effects/ripple_animation.h"
|
||||||
#include "ui/image/image_prepare.h"
|
#include "ui/image/image_prepare.h"
|
||||||
|
#include "ui/power_saving.h"
|
||||||
#include "ui/rect.h"
|
#include "ui/rect.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
#include "ui/widgets/shadow.h"
|
#include "ui/widgets/shadow.h"
|
||||||
|
@ -219,6 +220,13 @@ void FillSponsoredMessageBar(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
const auto paused = [=]() -> Fn<bool()> {
|
||||||
|
if (const auto c = FindSessionController(widget)) {
|
||||||
|
using Gif = Window::GifPauseReason;
|
||||||
|
return [=] { return c->isGifPausedAtLeastFor(Gif::Any); };
|
||||||
|
}
|
||||||
|
return [] { return false; };
|
||||||
|
};
|
||||||
const auto kLinesForPhoto = 3;
|
const auto kLinesForPhoto = 3;
|
||||||
const auto rightPhotoSize = titleSt.font->ascent * kLinesForPhoto;
|
const auto rightPhotoSize = titleSt.font->ascent * kLinesForPhoto;
|
||||||
const auto rightPhotoPlaceholder = titleSt.font->height * kLinesForPhoto;
|
const auto rightPhotoPlaceholder = titleSt.font->height * kLinesForPhoto;
|
||||||
|
@ -357,6 +365,8 @@ void FillSponsoredMessageBar(
|
||||||
.geometry = Ui::Text::GeometryDescriptor{
|
.geometry = Ui::Text::GeometryDescriptor{
|
||||||
.layout = std::move(lineLayout),
|
.layout = std::move(lineLayout),
|
||||||
},
|
},
|
||||||
|
.pausedEmoji = On(PowerSaving::kEmojiChat) || paused(),
|
||||||
|
.pausedSpoiler = On(PowerSaving::kChatSpoiler) || paused(),
|
||||||
});
|
});
|
||||||
state->lastPaintedContentTop = top;
|
state->lastPaintedContentTop = top;
|
||||||
state->lastPaintedContentLineAmount = lastContentLineAmount;
|
state->lastPaintedContentLineAmount = lastContentLineAmount;
|
||||||
|
|
Loading…
Add table
Reference in a new issue