mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Added start date to subscription entry in credits transactions history.
This commit is contained in:
parent
7096a4231f
commit
3cfa963f69
2 changed files with 22 additions and 9 deletions
|
@ -1310,6 +1310,16 @@ void AddSubscriptionEntryTable(
|
|||
controller,
|
||||
peerId);
|
||||
if (!s.until.isNull()) {
|
||||
if (s.subscription.period > 0) {
|
||||
const auto subscribed = s.until.addSecs(-s.subscription.period);
|
||||
if (subscribed.isValid()) {
|
||||
AddTableRow(
|
||||
table,
|
||||
tr::lng_group_invite_joined_row_date(),
|
||||
rpl::single(
|
||||
Ui::Text::WithEntities(langDateTime(subscribed))));
|
||||
}
|
||||
}
|
||||
AddTableRow(
|
||||
table,
|
||||
s.expired
|
||||
|
|
|
@ -1212,16 +1212,19 @@ void ReceiptCreditsBox(
|
|||
}
|
||||
if (s) {
|
||||
Ui::AddSkip(content);
|
||||
box->addRow(object_ptr<Ui::CenterWrap<>>(
|
||||
auto label = object_ptr<Ui::FlatLabel>(
|
||||
box,
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
box,
|
||||
s.cancelled
|
||||
? tr::lng_credits_subscription_off_about()
|
||||
: tr::lng_credits_subscription_on_about(
|
||||
lt_date,
|
||||
rpl::single(langDayOfMonthFull(s.until.date()))),
|
||||
st::creditsBoxAboutDivider)));
|
||||
s.cancelled
|
||||
? tr::lng_credits_subscription_off_about()
|
||||
: tr::lng_credits_subscription_on_about(
|
||||
lt_date,
|
||||
rpl::single(langDayOfMonthFull(s.until.date()))),
|
||||
st::creditsBoxAboutDivider);
|
||||
if (s.cancelled) {
|
||||
label->setTextColorOverride(st::menuIconAttentionColor->c);
|
||||
}
|
||||
box->addRow(
|
||||
object_ptr<Ui::CenterWrap<>>(box, std::move(label)));
|
||||
}
|
||||
|
||||
Ui::AddSkip(content);
|
||||
|
|
Loading…
Add table
Reference in a new issue