mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Removed Window::SessionNavigation from ShareBox.
This commit is contained in:
parent
309d4ea702
commit
fa50a5962c
4 changed files with 11 additions and 11 deletions
|
@ -1204,7 +1204,7 @@ object_ptr<Ui::BoxContent> ShareInviteLinkBox(
|
|||
.copyCallback = std::move(copyCallback),
|
||||
.submitCallback = std::move(submitCallback),
|
||||
.filterCallback = [](auto peer) { return peer->canWrite(); },
|
||||
.navigation = App::wnd()->sessionController() });
|
||||
});
|
||||
*box = Ui::MakeWeak(object.data());
|
||||
return object;
|
||||
}
|
||||
|
|
|
@ -197,6 +197,7 @@ private:
|
|||
ShareBox::ShareBox(QWidget*, Descriptor &&descriptor)
|
||||
: _descriptor(std::move(descriptor))
|
||||
, _api(&_descriptor.session->mtp())
|
||||
, _show(std::make_shared<Ui::BoxShow>(this))
|
||||
, _select(
|
||||
this,
|
||||
(_descriptor.stMultiSelect
|
||||
|
@ -255,19 +256,20 @@ void ShareBox::prepareCommentField() {
|
|||
field->setMarkdownReplacesEnabled(rpl::single(true));
|
||||
if (_descriptor.initEditLink) {
|
||||
_descriptor.initEditLink(field);
|
||||
} else if (_descriptor.navigation) {
|
||||
} else if (_show->valid()) {
|
||||
field->setEditLinkCallback(
|
||||
DefaultEditLinkCallback(
|
||||
std::make_shared<Window::Show>(_descriptor.navigation),
|
||||
_show,
|
||||
_descriptor.session,
|
||||
field));
|
||||
field,
|
||||
_descriptor.stComment));
|
||||
}
|
||||
field->setSubmitSettings(Core::App().settings().sendSubmitWay());
|
||||
|
||||
if (_descriptor.initSpellchecker) {
|
||||
_descriptor.initSpellchecker(field);
|
||||
} else if (_descriptor.navigation) {
|
||||
InitSpellchecker(_descriptor.navigation->parentController(), field);
|
||||
} else if (_show->valid()) {
|
||||
InitSpellchecker(_show, _descriptor.session, field, true);
|
||||
}
|
||||
Ui::SendPendingMoveResizeEvents(_comment);
|
||||
if (_bottomWidget) {
|
||||
|
@ -602,7 +604,7 @@ void ShareBox::submitSilent() {
|
|||
|
||||
void ShareBox::submitScheduled() {
|
||||
const auto callback = [=](Api::SendOptions options) { submit(options); };
|
||||
Ui::show(
|
||||
_show->showBox(
|
||||
HistoryView::PrepareScheduleBox(
|
||||
this,
|
||||
sendMenuType(),
|
||||
|
|
|
@ -8,7 +8,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#pragma once
|
||||
|
||||
#include "boxes/abstract_box.h"
|
||||
#include "base/observer.h"
|
||||
#include "base/timer.h"
|
||||
#include "history/view/history_view_schedule_box.h"
|
||||
#include "ui/chat/forward_options_box.h"
|
||||
|
@ -28,7 +27,6 @@ enum class Type;
|
|||
|
||||
namespace Window {
|
||||
class SessionController;
|
||||
class SessionNavigation;
|
||||
} // namespace Window
|
||||
|
||||
namespace Api {
|
||||
|
@ -80,7 +78,6 @@ public:
|
|||
CopyCallback copyCallback;
|
||||
SubmitCallback submitCallback;
|
||||
FilterCallback filterCallback;
|
||||
Window::SessionNavigation *navigation = nullptr;
|
||||
Fn<void(not_null<Ui::InputField*>)> initSpellchecker;
|
||||
Fn<void(not_null<Ui::InputField*>)> initEditLink;
|
||||
object_ptr<Ui::RpWidget> bottomWidget = { nullptr };
|
||||
|
@ -139,6 +136,8 @@ private:
|
|||
Descriptor _descriptor;
|
||||
MTP::Sender _api;
|
||||
|
||||
std::shared_ptr<Ui::BoxShow> _show;
|
||||
|
||||
object_ptr<Ui::MultiSelect> _select;
|
||||
object_ptr<Ui::SlideWrap<Ui::InputField>> _comment;
|
||||
object_ptr<Ui::RpWidget> _bottomWidget;
|
||||
|
|
|
@ -365,7 +365,6 @@ void FastShareMessage(not_null<HistoryItem*> item) {
|
|||
.copyCallback = std::move(copyLinkCallback),
|
||||
.submitCallback = std::move(submitCallback),
|
||||
.filterCallback = std::move(filterCallback),
|
||||
.navigation = App::wnd()->sessionController(),
|
||||
.forwardOptions = {
|
||||
.messagesCount = int(data->msgIds.size()),
|
||||
.show = !hasOnlyForcedForwardedInfo,
|
||||
|
|
Loading…
Add table
Reference in a new issue