mirror of https://github.com/procxx/kepka.git
Add some debug information for crashes.
This commit is contained in:
parent
9c72470c17
commit
3325106837
|
@ -356,7 +356,9 @@ Storage::SharedMediaTypesMask HistoryItem::sharedMediaTypes() const {
|
|||
|
||||
void HistoryItem::indexAsNewItem() {
|
||||
if (IsServerMsgId(id)) {
|
||||
CrashReports::SetAnnotation("addToUnreadMentions", QString::number(id));
|
||||
addToUnreadMentions(UnreadMentionType::New);
|
||||
CrashReports::ClearAnnotation("addToUnreadMentions");
|
||||
if (const auto types = sharedMediaTypes()) {
|
||||
Auth().storage().add(Storage::SharedMediaAddNew(
|
||||
history()->peer->id,
|
||||
|
|
|
@ -3028,12 +3028,18 @@ void MediaView::findCurrent() {
|
|||
? (_index | func::add(*_sharedMediaData->skippedBefore()))
|
||||
: base::none;
|
||||
_fullCount = _sharedMediaData->fullCount();
|
||||
if (_index) {
|
||||
Assert(*_index >= 0 && *_index < _sharedMediaData->size());
|
||||
}
|
||||
} else if (_userPhotosData) {
|
||||
_index = _photo ? _userPhotosData->indexOf(_photo->id) : base::none;
|
||||
_fullIndex = _userPhotosData->skippedBefore()
|
||||
? (_index | func::add(*_userPhotosData->skippedBefore()))
|
||||
: base::none;
|
||||
_fullCount = _userPhotosData->fullCount();
|
||||
if (_index) {
|
||||
Assert(*_index >= 0 && *_index < _userPhotosData->size());
|
||||
}
|
||||
} else {
|
||||
_index = _fullIndex = _fullCount = base::none;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue