mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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,
|
controller,
|
||||||
peerId);
|
peerId);
|
||||||
if (!s.until.isNull()) {
|
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(
|
AddTableRow(
|
||||||
table,
|
table,
|
||||||
s.expired
|
s.expired
|
||||||
|
|
|
@ -1212,16 +1212,19 @@ void ReceiptCreditsBox(
|
||||||
}
|
}
|
||||||
if (s) {
|
if (s) {
|
||||||
Ui::AddSkip(content);
|
Ui::AddSkip(content);
|
||||||
box->addRow(object_ptr<Ui::CenterWrap<>>(
|
auto label = object_ptr<Ui::FlatLabel>(
|
||||||
box,
|
box,
|
||||||
object_ptr<Ui::FlatLabel>(
|
s.cancelled
|
||||||
box,
|
? tr::lng_credits_subscription_off_about()
|
||||||
s.cancelled
|
: tr::lng_credits_subscription_on_about(
|
||||||
? tr::lng_credits_subscription_off_about()
|
lt_date,
|
||||||
: tr::lng_credits_subscription_on_about(
|
rpl::single(langDayOfMonthFull(s.until.date()))),
|
||||||
lt_date,
|
st::creditsBoxAboutDivider);
|
||||||
rpl::single(langDayOfMonthFull(s.until.date()))),
|
if (s.cancelled) {
|
||||||
st::creditsBoxAboutDivider)));
|
label->setTextColorOverride(st::menuIconAttentionColor->c);
|
||||||
|
}
|
||||||
|
box->addRow(
|
||||||
|
object_ptr<Ui::CenterWrap<>>(box, std::move(label)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ui::AddSkip(content);
|
Ui::AddSkip(content);
|
||||||
|
|
Loading…
Add table
Reference in a new issue