Added lottie icon to rtmp box.

This commit is contained in:
23rd
2025-11-05 13:14:17 +03:00
parent fb928a15a6
commit ed7c5e97cb
3 changed files with 21 additions and 0 deletions
Binary file not shown.
@@ -47,6 +47,7 @@
<file alias="toast/tagged.tgs">../../animations/toast/tagged.tgs</file>
<file alias="my_gifts_empty.tgs">../../animations/my_gifts_empty.tgs</file>
<file alias="toast/chats_filter_in.tgs">../../animations/toast/chats_filter_in.tgs</file>
<file alias="rtmp.tgs">../../animations/rtmp.tgs</file>
<file alias="profile_muting.tgs">../../animations/profile/profile_muting.tgs</file>
<file alias="profile_unmuting.tgs">../../animations/profile/profile_unmuting.tgs</file>
@@ -13,8 +13,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat.h"
#include "data/data_user.h"
#include "lang/lang_keys.h"
#include "lottie/lottie_icon.h"
#include "main/main_account.h"
#include "main/main_session.h"
#include "settings/settings_common.h"
#include "ui/boxes/confirm_box.h"
#include "ui/layers/generic_box.h"
#include "ui/text/text_utilities.h"
@@ -48,6 +50,24 @@ void StartWithBox(
};
const auto state = box->lifetime().make_state<State>();
{
auto icon = Settings::CreateLottieIcon(
box->verticalLayout(),
{
.name = u"rtmp"_q,
.sizeOverride = {
st::changePhoneIconSize,
st::changePhoneIconSize,
},
},
{});
box->verticalLayout()->add(std::move(icon.widget), {}, style::al_top);
box->setShowFinishedCallback([animate = icon.animate] {
animate(anim::repeat::loop);
});
Ui::AddSkip(box->verticalLayout());
}
StartRtmpProcess::FillRtmpRows(
box->verticalLayout(),
true,