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

Displaying time in chat list for all timestamps in the last 20 hours.

Fixed possible crash in MediaView video player seek after clip error.
Fixed possible crash in native event filter on Windows.
Removed unused lng_stickers_add key.
This commit is contained in:
John Preston
2016-07-26 15:09:40 +03:00
parent 82a0ac28ad
commit 832163c1b7
6 changed files with 26 additions and 18 deletions

View File

@@ -731,7 +731,10 @@ void MediaView::clipCallback(Media::Clip::Notification notification) {
case NotificationReinit: {
if (auto item = App::histItemById(_msgmigrated ? 0 : _channel, _msgid)) {
if (_gif->state() == State::Error) {
_current = QPixmap();
stopGif();
updateControls();
update();
break;
} else if (_gif->state() == State::Finished) {
_videoPositionMs = _videoDurationMs;
_videoStopped = true;
@@ -1118,7 +1121,10 @@ void MediaView::displayPhoto(PhotoData *photo, HistoryItem *item) {
void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty messages shown as docs: doc can be NULL
if (!doc || (!doc->isAnimation() && !doc->isVideo()) || doc != _doc || (item && (item->id != _msgid || (item->history() != (_msgmigrated ? _migrated : _history))))) {
_fullScreenVideo = false;
_current = QPixmap();
stopGif();
} else if (gifShown()) {
_current = QPixmap();
}
_doc = doc;
_photo = nullptr;
@@ -1128,8 +1134,6 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty
_autoplayVideoDocument = nullptr;
}
_current = QPixmap();
_caption = Text();
if (_doc) {
if (_doc->sticker()) {