mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Simplify marked text context logic.
This commit is contained in:
@@ -895,10 +895,10 @@ rpl::producer<uint64> AddCurrencyAction(
|
||||
.append(QChar(' '))
|
||||
.append(Info::ChannelEarn::MajorPart(balance))
|
||||
.append(Info::ChannelEarn::MinorPart(balance)),
|
||||
Core::MarkedTextContext{
|
||||
Core::TextContext({
|
||||
.session = &user->session(),
|
||||
.customEmojiRepaint = [=] { name->update(); },
|
||||
});
|
||||
.repaint = [=] { name->update(); },
|
||||
}));
|
||||
name->resizeToNaturalWidth(available);
|
||||
name->moveToRight(st::settingsButtonRightSkip, st.padding.top());
|
||||
}, name->lifetime());
|
||||
@@ -968,10 +968,10 @@ rpl::producer<StarsAmount> AddCreditsAction(
|
||||
base::duplicate(icon)
|
||||
.append(QChar(' '))
|
||||
.append(Lang::FormatStarsAmountDecimal(balance)),
|
||||
Core::MarkedTextContext{
|
||||
Core::TextContext({
|
||||
.session = &user->session(),
|
||||
.customEmojiRepaint = [=] { name->update(); },
|
||||
});
|
||||
.repaint = [=] { name->update(); },
|
||||
}));
|
||||
name->resizeToNaturalWidth(available);
|
||||
name->moveToRight(st::settingsButtonRightSkip, st.padding.top());
|
||||
}, name->lifetime());
|
||||
|
||||
Reference in New Issue
Block a user