mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Some parts from history module moved to history_[item,media,message].
This commit is contained in:
@@ -77,6 +77,10 @@ const TextParseOptions &itemTextOptions(History *h, PeerData *f) {
|
||||
return _historyTextOptions;
|
||||
}
|
||||
|
||||
const TextParseOptions &itemTextOptions(const HistoryItem *item) {
|
||||
return itemTextOptions(item->history(), item->author());
|
||||
}
|
||||
|
||||
const TextParseOptions &itemTextNoMonoOptions(History *h, PeerData *f) {
|
||||
if ((h->peer->isUser() && h->peer->asUser()->botInfo) || (f->isUser() && f->asUser()->botInfo) || (h->peer->isChat() && h->peer->asChat()->botStatus >= 0) || (h->peer->isMegagroup() && h->peer->asChannel()->mgInfo->botStatus >= 0)) {
|
||||
return _historyBotNoMonoOptions;
|
||||
@@ -84,6 +88,10 @@ const TextParseOptions &itemTextNoMonoOptions(History *h, PeerData *f) {
|
||||
return _historyTextNoMonoOptions;
|
||||
}
|
||||
|
||||
const TextParseOptions &itemTextNoMonoOptions(const HistoryItem *item) {
|
||||
return itemTextNoMonoOptions(item->history(), item->author());
|
||||
}
|
||||
|
||||
QString formatSizeText(qint64 size) {
|
||||
if (size >= 1024 * 1024) { // more than 1 mb
|
||||
qint64 sizeTenthMb = (size * 10 / (1024 * 1024));
|
||||
|
Reference in New Issue
Block a user