From 36662c51dd8386b92ae3d9da00d7cdaffda3cfe5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 6 Nov 2023 22:16:12 +0400 Subject: [PATCH] Fix giveaway sticker and phrases. --- Telegram/Resources/langs/lang.strings | 8 ++++---- Telegram/SourceFiles/data/data_media_types.cpp | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 001925cbe5..f3d56b3d0e 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2159,10 +2159,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_prizes_end_when_finish" = "On {date}, Telegram automatically selected {winners}."; "lng_prizes_end_activated#one" = "**{count}** of the winners already used their gift link."; "lng_prizes_end_activated#other" = "**{count}** of the winners already used their gift links."; -"lng_prizes_winners_all_of_one#one" = "{count} random subscribers of {channel}."; -"lng_prizes_winners_all_of_one#other" = "{count} random subscribers of {channel}."; -"lng_prizes_winners_all_of_many#one" = "{count} random subscribers of {channel} and other listed channels."; -"lng_prizes_winners_all_of_many#other" = "{count} random subscribers of {channel} and other listed channels."; +"lng_prizes_winners_all_of_one#one" = "{count} random subscribers of {channel}"; +"lng_prizes_winners_all_of_one#other" = "{count} random subscribers of {channel}"; +"lng_prizes_winners_all_of_many#one" = "{count} random subscribers of {channel} and other listed channels"; +"lng_prizes_winners_all_of_many#other" = "{count} random subscribers of {channel} and other listed channels"; "lng_prizes_winners_new_of_one#one" = "{count} random user that joined {channel} after {start_date}"; "lng_prizes_winners_new_of_one#other" = "{count} random users that joined {channel} after {start_date}"; "lng_prizes_winners_new_of_many#one" = "{count} random user that joined {channel} and other listed channels after {start_date}"; diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 79de11506d..1132d75c49 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -47,6 +47,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "storage/storage_shared_media.h" #include "storage/localstorage.h" #include "chat_helpers/stickers_dice_pack.h" // Stickers::DicePacks::IsSlot. +#include "chat_helpers/stickers_gift_box_pack.h" #include "data/data_session.h" #include "data/data_auto_download.h" #include "data/data_photo.h" @@ -369,6 +370,7 @@ Giveaway ComputeGiveawayData( .untilDate = data.vuntil_date().v, .quantity = data.vquantity().v, .months = data.vmonths().v, + .all = !data.is_only_new_subscribers(), }; result.channels.reserve(data.vchannels().v.size()); const auto owner = &item->history()->owner(); @@ -2188,6 +2190,7 @@ MediaGiveaway::MediaGiveaway( const Giveaway &data) : Media(parent) , _giveaway(data) { + parent->history()->session().giftBoxStickersPacks().load(); } std::unique_ptr MediaGiveaway::clone(not_null parent) {