diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index cfab9c867..99cee3ef8 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -4985,7 +4985,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_channel_earn_balance_password_title" = "Two-step verification"; "lng_channel_earn_balance_password_description" = "Please enter your password to withdraw."; "lng_channel_earn_balance_about" = "Collect your reward using Fragment, a third-party platform used by the advertiser to pay for the ad. {link}"; -"lng_channel_earn_balance_about_temp" = "By the end of May, you will be able to collect your reward using Fragment, a third-party platform used by the advertiser to pay for the ad. {link}"; +"lng_channel_earn_balance_about_temp" = "In the coming weeks you will be able to collect your reward using Fragment, a third-party platform used by advertisers to pay ads. {link}"; "lng_channel_earn_transfer_sure_about1" = "Check the address of the recipient:"; "lng_channel_earn_transfer_sure_about2" = "This action can not be undone. If the address above is incorrect you will lose your TON."; "lng_channel_earn_history_title" = "Transaction history"; @@ -5013,7 +5013,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_channel_earn_learn_out_subtitle" = "Flexible withdrawals"; "lng_channel_earn_learn_out_about" = "You can withdraw your TON any time."; "lng_channel_earn_learn_coin_title" = "What is {emoji} TON?"; -"lng_channel_earn_learn_coin_about" = "TON is a blockchain platform and cryptocurrency that Telegram uses for its record scalability and ultra low commissions on transactions. {link}"; +"lng_channel_earn_learn_coin_about" = "TON is a blockchain platform and cryptocurrency that Telegram uses for its high speed and low commissions on transactions. {link}"; "lng_channel_earn_learn_close" = "Got it"; "lng_channel_earn_chart_top_hours" = "Ad impressions"; "lng_channel_earn_chart_revenue" = "Ad revenue"; diff --git a/Telegram/SourceFiles/info/channel_statistics/earn/info_earn_inner_widget.cpp b/Telegram/SourceFiles/info/channel_statistics/earn/info_earn_inner_widget.cpp index fb190736c..463cb1cca 100644 --- a/Telegram/SourceFiles/info/channel_statistics/earn/info_earn_inner_widget.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/earn/info_earn_inner_widget.cpp @@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "api/api_earn.h" #include "api/api_statistics.h" +#include "base/unixtime.h" #include "boxes/peers/edit_peer_color_box.h" // AddLevelBadge. #include "chat_helpers/stickers_emoji_pack.h" #include "core/ui_integration.h" // Core::MarkedTextContext. @@ -203,9 +204,13 @@ void InnerWidget::fill() { const auto currency = u"TON"_q; const auto multiplier = data.usdRate; + constexpr auto kNonInteractivePeriod = 1717200000; + const auto nonInteractive = base::unixtime::now() < kNonInteractivePeriod; + const auto session = &_peer->session(); const auto channel = _peer->asChannel(); - const auto withdrawalEnabled = WithdrawalEnabled(session); + const auto withdrawalEnabled = WithdrawalEnabled(session) + && !nonInteractive; const auto makeContext = [=](not_null l) { return Core::MarkedTextContext{ .session = session, @@ -506,6 +511,11 @@ void InnerWidget::fill() { addOverview(data.overallRevenue, tr::lng_channel_earn_total); Ui::AddSkip(container); } + if (!channel->amCreator()) { + Ui::AddSkip(container); + Ui::AddSkip(container); + return; + } Ui::AddSkip(container); Ui::AddDivider(container); Ui::AddSkip(container);