mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Remove description in intro settings preview.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user