2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Extract some Lottie::Animation code to Lottie::Player.

This commit is contained in:
John Preston
2019-06-28 13:33:47 +02:00
parent 4a7b5a8e01
commit cbffeca8d5
23 changed files with 363 additions and 272 deletions

View File

@@ -45,14 +45,16 @@ TabbedPanel::TabbedPanel(
, _maxContentHeight(st::emojiPanMaxHeight) {
_selector->setParent(this);
_selector->setRoundRadius(st::buttonRadius);
_selector->setAfterShownCallback([this](SelectorTab tab) {
if (tab == SelectorTab::Gifs) {
_controller->enableGifPauseReason(Window::GifPauseReason::SavedGifs);
_selector->setAfterShownCallback([=](SelectorTab tab) {
if (tab == SelectorTab::Gifs || tab == SelectorTab::Stickers) {
_controller->enableGifPauseReason(
Window::GifPauseReason::SavedGifs);
}
});
_selector->setBeforeHidingCallback([this](SelectorTab tab) {
if (tab == SelectorTab::Gifs) {
_controller->disableGifPauseReason(Window::GifPauseReason::SavedGifs);
_selector->setBeforeHidingCallback([=](SelectorTab tab) {
if (tab == SelectorTab::Gifs || tab == SelectorTab::Stickers) {
_controller->disableGifPauseReason(
Window::GifPauseReason::SavedGifs);
}
});
_selector->showRequests(