2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

tilde fix in 100%, dialogs repaint fix, markdown (bold, italic, code, pre support) added

This commit is contained in:
John Preston
2015-10-23 18:06:56 +02:00
parent 2b36f4d23a
commit 3df66a7ed3
24 changed files with 1027 additions and 525 deletions

View File

@@ -33,7 +33,8 @@ static const uint32 FullItemSel = 0xFFFFFFFF;
typedef QMap<int32, HistoryItem*> SelectedItemSet;
extern TextParseOptions _textNameOptions, _textDlgOptions, _historyTextOptions, _historyBotOptions;
extern TextParseOptions _textNameOptions, _textDlgOptions;
extern TextParseOptions _historyTextOptions, _historyBotOptions, _historyTextNoMonoOptions, _historyBotNoMonoOptions;
#include "structs.h"
@@ -930,9 +931,9 @@ public:
virtual HistoryMedia *getMedia(bool inOverview = false) const {
return 0;
}
virtual void setText(const QString &text, const LinksInText &links) {
virtual void setText(const QString &text, const EntitiesInText &links) {
}
virtual void getTextWithLinks(QString &text, LinksInText &links) {
virtual void getTextWithEntities(QString &text, EntitiesInText &links) {
}
virtual bool textHasLinks() {
return false;
@@ -1502,7 +1503,7 @@ class HistoryMessage : public HistoryItem {
public:
HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg);
HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, QDateTime date, int32 from, const QString &msg, const LinksInText &links, HistoryMedia *media); // local forwarded
HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, HistoryMedia *media); // local forwarded
HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, QDateTime date, int32 from, DocumentData *doc); // local sticker and reply sticker
void initTime();
@@ -1548,12 +1549,12 @@ public:
}
QString selectedText(uint32 selection) const;
LinksInText textLinks() const;
EntitiesInText textEntities() const;
QString inDialogsText() const;
HistoryMedia *getMedia(bool inOverview = false) const;
void setMedia(const MTPMessageMedia *media, bool allowEmitResize);
void setText(const QString &text, const LinksInText &links);
void getTextWithLinks(QString &text, LinksInText &links);
void setText(const QString &text, const EntitiesInText &entities);
void getTextWithEntities(QString &text, EntitiesInText &entities);
bool textHasLinks();
int32 infoWidth() const {
@@ -1897,4 +1898,5 @@ protected:
bool freezed;
};
const TextParseOptions &itemTextParseOptions(History *h, PeerData *f);
const TextParseOptions &itemTextOptions(History *h, PeerData *f);
const TextParseOptions &itemTextNoMonoOptions(History *h, PeerData *f);