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

Added ability to show document from Controller for sections.

This commit is contained in:
23rd
2021-06-17 00:31:15 +03:00
committed by John Preston
parent eefa7263b5
commit dc0aaec4a4
16 changed files with 117 additions and 16 deletions

View File

@@ -1235,8 +1235,15 @@ void SessionController::openPhoto(
void SessionController::openDocument(
not_null<DocumentData*> document,
FullMsgId contextId) {
FullMsgId contextId,
bool showInMediaView) {
// TEMP.
if (showInMediaView) {
_window->openInMediaView(Media::View::OpenRequest(
document,
session().data().message(contextId)));
return;
}
Data::ResolveDocument(document, session().data().message(contextId));
}