Diff reduce: remove unnecessary includes and functions

This commit is contained in:
Eric Kotato 2020-05-01 17:25:47 +03:00
parent 649192f23e
commit 21c73063c8
3 changed files with 0 additions and 52 deletions

View file

@ -13,7 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "history/history.h"
#include "history/history_item.h"
#include "history/history_widget.h"
#include "ui/widgets/checkbox.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/labels.h"

View file

@ -109,56 +109,6 @@ HiddenSenderInfo::HiddenSenderInfo(const QString &name)
}
}
void HistoryMessageForwarded::create() const {
auto phrase = QString();
const auto fromChannel = originalSender
&& originalSender->isChannel()
&& !originalSender->isMegagroup();
const auto name = originalSender
? originalSender->name
: hiddenSenderInfo->name;
if (!originalAuthor.isEmpty()) {
phrase = tr::lng_forwarded_signed(
tr::now,
lt_channel,
name,
lt_user,
originalAuthor);
} else {
phrase = name;
}
if (fromChannel) {
phrase = tr::lng_forwarded_channel(
tr::now,
lt_channel,
textcmdLink(1, phrase));
} else {
phrase = tr::lng_forwarded(
tr::now,
lt_user,
textcmdLink(1, phrase));
}
TextParseOptions opts = {
TextParseRichText,
0,
0,
Qt::LayoutDirectionAuto
};
text.setText(st::fwdTextStyle, phrase, opts);
static const auto hidden = std::make_shared<LambdaClickHandler>([] {
Ui::Toast::Show(tr::lng_forwarded_hidden(tr::now));
});
text.setLink(1, fromChannel
? goToMessageClickHandler(originalSender, originalId)
: originalSender
? originalSender->openLink()
: hidden);
}
void HistoryMessageForwarded::create(const HistoryMessageVia *via) const {
auto phrase = QString();
const auto fromChannel = originalSender

View file

@ -71,7 +71,6 @@ struct HiddenSenderInfo {
};
struct HistoryMessageForwarded : public RuntimeComponent<HistoryMessageForwarded, HistoryItem> {
void create() const;
void create(const HistoryMessageVia *via) const;
TimeId originalDate = 0;