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

inline gifs playback / stopping done

This commit is contained in:
John Preston
2015-12-23 19:48:44 +03:00
parent 9a72293e0a
commit 6170144fe9
17 changed files with 143 additions and 42 deletions

View File

@@ -5576,6 +5576,17 @@ void HistoryWidget::peerMessagesUpdated() {
if (_list) peerMessagesUpdated(_peer->id);
}
bool HistoryWidget::isItemVisible(HistoryItem *item) {
if (isHidden() || _a_show.animating() || !_list) {
return false;
}
int32 top = _list->itemTop(item), st = _scroll.scrollTop();
if (top < 0 || top + item->height() <= st || top >= st + _scroll.height()) {
return false;
}
return true;
}
void HistoryWidget::ui_redrawHistoryItem(const HistoryItem *item) {
if (_peer && _list && (item->history() == _history || (_migrated && item->history() == _migrated))) {
_list->redrawItem(item);