mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added ability to show document from Controller for sections.
This commit is contained in:
@@ -316,6 +316,22 @@ DocumentClickHandler::DocumentClickHandler(
|
||||
, _document(document) {
|
||||
}
|
||||
|
||||
DocumentOpenClickHandler::DocumentOpenClickHandler(
|
||||
not_null<DocumentData*> document,
|
||||
Fn<void()> &&callback)
|
||||
: DocumentClickHandler(document)
|
||||
, _handler(std::move(callback)) {
|
||||
}
|
||||
|
||||
void DocumentOpenClickHandler::onClickImpl() const {
|
||||
if (_handler) {
|
||||
_handler();
|
||||
}
|
||||
}
|
||||
|
||||
void DocumentOpenClickHandlerOld::onClickImpl() const {
|
||||
}
|
||||
|
||||
void DocumentOpenClickHandler::Open(
|
||||
Data::FileOrigin origin,
|
||||
not_null<DocumentData*> data,
|
||||
@@ -323,10 +339,6 @@ void DocumentOpenClickHandler::Open(
|
||||
Data::ResolveDocument(data, context);
|
||||
}
|
||||
|
||||
void DocumentOpenClickHandler::onClickImpl() const {
|
||||
Open(context(), document(), getActionItem());
|
||||
}
|
||||
|
||||
void DocumentSaveClickHandler::Save(
|
||||
Data::FileOrigin origin,
|
||||
not_null<DocumentData*> data,
|
||||
|
Reference in New Issue
Block a user