mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Remove description in intro settings preview.
This commit is contained in:
parent
fcc9e0b2db
commit
5e68dace9f
3 changed files with 8 additions and 5 deletions
|
@ -270,9 +270,12 @@ void AboutView::makeIntro(not_null<UserData*> user) {
|
||||||
make(user->businessDetails().intro);
|
make(user->businessDetails().intro);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutView::make(Data::ChatIntro data) {
|
void AboutView::make(Data::ChatIntro data, bool preview) {
|
||||||
const auto text = data
|
const auto text = data
|
||||||
? tr::lng_action_set_chat_intro(tr::now, lt_from, _history->peer->name())
|
? tr::lng_action_set_chat_intro(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
_history->peer->name())
|
||||||
: QString();
|
: QString();
|
||||||
const auto item = _history->makeMessage({
|
const auto item = _history->makeMessage({
|
||||||
.id = _history->nextNonHistoryEntryId(),
|
.id = _history->nextNonHistoryEntryId(),
|
||||||
|
@ -311,7 +314,7 @@ void AboutView::make(Data::ChatIntro data) {
|
||||||
.maxWidth = st::chatIntroWidth,
|
.maxWidth = st::chatIntroWidth,
|
||||||
.serviceLink = std::make_shared<LambdaClickHandler>(handler),
|
.serviceLink = std::make_shared<LambdaClickHandler>(handler),
|
||||||
.service = true,
|
.service = true,
|
||||||
.hideServiceText = text.isEmpty(),
|
.hideServiceText = preview || text.isEmpty(),
|
||||||
}));
|
}));
|
||||||
if (!data.sticker && _helloChosen) {
|
if (!data.sticker && _helloChosen) {
|
||||||
data.sticker = _helloChosen;
|
data.sticker = _helloChosen;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
|
|
||||||
bool refresh();
|
bool refresh();
|
||||||
|
|
||||||
void make(Data::ChatIntro data);
|
void make(Data::ChatIntro data, bool preview = false);
|
||||||
|
|
||||||
int top = 0;
|
int top = 0;
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
|
|
@ -384,7 +384,7 @@ void PreviewWrap::prepare(rpl::producer<Data::ChatIntro> value) {
|
||||||
_delegate.get());
|
_delegate.get());
|
||||||
|
|
||||||
std::move(value) | rpl::start_with_next([=](Data::ChatIntro intro) {
|
std::move(value) | rpl::start_with_next([=](Data::ChatIntro intro) {
|
||||||
_view->make(std::move(intro));
|
_view->make(std::move(intro), true);
|
||||||
if (width() >= st::msgMinWidth) {
|
if (width() >= st::msgMinWidth) {
|
||||||
resizeTo(width());
|
resizeTo(width());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue