Remove description in intro settings preview.
This commit is contained in:
parent
fcc9e0b2db
commit
5e68dace9f
|
@ -270,9 +270,12 @@ void AboutView::makeIntro(not_null<UserData*> user) {
|
|||
make(user->businessDetails().intro);
|
||||
}
|
||||
|
||||
void AboutView::make(Data::ChatIntro data) {
|
||||
void AboutView::make(Data::ChatIntro data, bool preview) {
|
||||
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();
|
||||
const auto item = _history->makeMessage({
|
||||
.id = _history->nextNonHistoryEntryId(),
|
||||
|
@ -311,7 +314,7 @@ void AboutView::make(Data::ChatIntro data) {
|
|||
.maxWidth = st::chatIntroWidth,
|
||||
.serviceLink = std::make_shared<LambdaClickHandler>(handler),
|
||||
.service = true,
|
||||
.hideServiceText = text.isEmpty(),
|
||||
.hideServiceText = preview || text.isEmpty(),
|
||||
}));
|
||||
if (!data.sticker && _helloChosen) {
|
||||
data.sticker = _helloChosen;
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
bool refresh();
|
||||
|
||||
void make(Data::ChatIntro data);
|
||||
void make(Data::ChatIntro data, bool preview = false);
|
||||
|
||||
int top = 0;
|
||||
int height = 0;
|
||||
|
|
|
@ -384,7 +384,7 @@ void PreviewWrap::prepare(rpl::producer<Data::ChatIntro> value) {
|
|||
_delegate.get());
|
||||
|
||||
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) {
|
||||
resizeTo(width());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue