fix bug when everything was treated as animation, bug with not working group amount of messages, handled the situation when preview is painted but the file was lost

This commit is contained in:
Blue 2021-05-17 00:52:59 +03:00
parent 0d584c5aba
commit 721f6daa36
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
10 changed files with 62 additions and 8 deletions

View file

@ -353,6 +353,10 @@ void MessageDelegate::paintPreview(const Models::FeedItem& data, QPainter* paint
previews->insert(std::make_pair(data.id, preview));
}
if (!preview->isFileReachable()) { //this is the situation when the file preview couldn't be painted because the file was moved
emit invalidPath(data.id); //or deleted. This signal notifies the model, and the model notifies the core, preview can
} //handle being invalid for as long as I need and can be even become valid again with a new path
option.rect.adjust(0, preview->size().height() + textMargin, 0, 0);
}