2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Added ability to force open media viewer from overview layout.

This commit is contained in:
23rd
2021-07-22 19:12:30 +03:00
committed by John Preston
parent b366c27a0c
commit abdd2fa99b
5 changed files with 16 additions and 7 deletions

View File

@@ -191,13 +191,14 @@ void ItemBase::ensureCheckboxCreated() {
}
void RadialProgressItem::setDocumentLinks(
not_null<DocumentData*> document) {
not_null<DocumentData*> document,
bool forceOpen) {
const auto context = parent()->fullId();
setLinks(
std::make_shared<DocumentOpenClickHandler>(
document,
crl::guard(this, [=](FullMsgId id) {
delegate()->openDocument(document, id);
delegate()->openDocument(document, id, forceOpen);
}),
context),
std::make_shared<DocumentSaveClickHandler>(document, context),