2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Update API scheme to layer 175. Business promo.

This commit is contained in:
John Preston
2024-02-19 11:35:53 +04:00
parent 0fad42b5b4
commit 0c991466f5
36 changed files with 756 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "settings/settings_main.h"
#include "settings/settings_business.h"
#include "settings/settings_codes.h"
#include "settings/settings_chat.h"
#include "settings/settings_information.h"
@@ -419,6 +420,19 @@ void SetupPremium(
controller->setPremiumRef("settings");
showOther(PremiumId());
});
const auto button = AddButtonWithIcon(
container,
tr::lng_business_title(),
st::settingsButton,
{ .icon = &st::menuIconShop });
button->addClickHandler([=] {
showOther(BusinessId());
});
constexpr auto kNewExpiresAt = int(1711958400);
if (base::unixtime::now() < kNewExpiresAt) {
Ui::NewBadge::AddToRight(button);
}
if (controller->session().premiumCanBuy()) {
const auto button = AddButtonWithIcon(
container,