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

Enable distinct selecting of grouped media.

This commit is contained in:
John Preston
2017-12-15 19:25:47 +03:00
parent 4c9931ab02
commit 537400d8b2
22 changed files with 880 additions and 306 deletions

View File

@@ -94,6 +94,8 @@ CoverWidget::CoverWidget(QWidget *parent, UserData *self)
}
PhotoData *CoverWidget::validatePhoto() const {
Expects(_self != nullptr);
const auto photo = _self->userpicPhotoId()
? App::photo(_self->userpicPhotoId())
: nullptr;
@@ -106,7 +108,7 @@ PhotoData *CoverWidget::validatePhoto() const {
}
void CoverWidget::showPhoto() {
if (auto photo = validatePhoto()) {
if (const auto photo = validatePhoto()) {
Messenger::Instance().showPhoto(photo, _self);
}
}