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

New media type Game added. Display of Game partially supported.

This commit is contained in:
John Preston
2016-09-27 16:37:18 +03:00
parent da49d8440a
commit 90a4b66366
23 changed files with 2241 additions and 812 deletions

View File

@@ -888,13 +888,13 @@ bool Document::updateStatusText() const {
Link::Link(HistoryMedia *media, HistoryItem *parent) : ItemBase(parent) {
AddComponents(Info::Bit());
const auto textWithEntities = _parent->originalText();
auto textWithEntities = _parent->originalText();
QString mainUrl;
auto text = textWithEntities.text;
auto &entities = textWithEntities.entities;
int32 from = 0, till = text.size(), lnk = entities.size();
for_const (const auto &entity, entities) {
for_const (auto &entity, entities) {
auto type = entity.type();
if (type != EntityInTextUrl && type != EntityInTextCustomUrl && type != EntityInTextEmail) {
continue;
@@ -908,7 +908,7 @@ Link::Link(HistoryMedia *media, HistoryItem *parent) : ItemBase(parent) {
}
while (lnk > 0 && till > from) {
--lnk;
const auto &entity = entities.at(lnk);
auto &entity = entities.at(lnk);
auto type = entity.type();
if (type != EntityInTextUrl && type != EntityInTextCustomUrl && type != EntityInTextEmail) {
++lnk;