2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

disabled libexif usage, mediaview showing gif/mp4 through ClipReader

This commit is contained in:
John Preston
2015-12-22 11:01:02 +03:00
parent 0fd6f04aa9
commit 62723f7576
20 changed files with 267 additions and 418 deletions

View File

@@ -664,7 +664,7 @@ void MainWidget::webPagesUpdate() {
if (j != items.cend()) {
for (HistoryItemsMap::const_iterator k = j.value().cbegin(), e = j.value().cend(); k != e; ++k) {
k.key()->initDimensions();
itemResized(k.key());
Notify::historyItemResized(k.key());
}
}
}
@@ -790,6 +790,18 @@ void MainWidget::notify_historyItemLayoutChanged(const HistoryItem *item) {
history.notify_historyItemLayoutChanged(item);
}
void MainWidget::notify_historyItemResized(const HistoryItem *item, bool scrollToIt) {
if (!item || ((history.peer() == item->history()->peer || (history.peer() && history.peer() == item->history()->peer->migrateTo())) && !item->detached())) {
history.notify_historyItemResized(item, scrollToIt);
} else if (item) {
item->history()->width = 0;
if (history.peer() == item->history()->peer || (history.peer() && history.peer() == item->history()->peer->migrateTo())) {
history.resizeEvent(0);
}
}
if (item) Ui::redrawHistoryItem(item);
}
void MainWidget::noHider(HistoryHider *destroyed) {
if (_hider == destroyed) {
_hider = 0;
@@ -1488,18 +1500,6 @@ void MainWidget::itemReplaced(HistoryItem *oldItem, HistoryItem *newItem) {
}
}
void MainWidget::itemResized(HistoryItem *row, bool scrollToIt) {
if (!row || ((history.peer() == row->history()->peer || (history.peer() && history.peer() == row->history()->peer->migrateTo())) && !row->detached())) {
history.itemResized(row, scrollToIt);
} else if (row) {
row->history()->width = 0;
if (history.peer() == row->history()->peer || (history.peer() && history.peer() == row->history()->peer->migrateTo())) {
history.resizeEvent(0);
}
}
if (row) Ui::redrawHistoryItem(row);
}
bool MainWidget::overviewFailed(PeerData *peer, const RPCError &error, mtpRequestId req) {
if (mtpIsFlood(error)) return false;
@@ -4163,7 +4163,7 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) {
if ((hasLinks && !item->hasTextLinks()) || (!hasLinks && item->textHasLinks())) {
item->setText(text, d.has_entities() ? entitiesFromMTP(d.ventities.c_vector().v) : EntitiesInText());
item->initDimensions();
itemResized(item);
Notify::historyItemResized(item);
if (item->hasTextLinks() && item->indexInOverview()) {
item->history()->addToOverview(item, OverviewLinks);
}