2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

media overview multiple selection done, fixed search result delete crash

This commit is contained in:
John Preston
2014-08-21 16:18:56 +04:00
parent db7fa9ba2f
commit 8a817eb204
13 changed files with 267 additions and 83 deletions

View File

@@ -245,15 +245,17 @@ void MediaView::showPhoto(PhotoData *photo, HistoryItem *context) {
_index = -1;
_msgid = context ? context->id : 0;
for (int i = 0, l = _history->_overview[OverviewPhotos].size(); i < l; ++i) {
if (_history->_overview[OverviewPhotos].at(i) == _msgid) {
_index = i;
break;
if (_history) {
for (int i = 0, l = _history->_overview[OverviewPhotos].size(); i < l; ++i) {
if (_history->_overview[OverviewPhotos].at(i) == _msgid) {
_index = i;
break;
}
}
}
if (_history->_overviewCount[OverviewPhotos] < 0) {
loadPhotosBack();
if (_history->_overviewCount[OverviewPhotos] < 0) {
loadPhotosBack();
}
}
showPhoto(photo);