mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Create dialogs widget only in the primary window.
This commit is contained in:
@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#include "base/weak_ptr.h"
|
||||
#include "base/unique_qptr.h"
|
||||
#include "chat_helpers/bot_command.h"
|
||||
#include "ui/rp_widget.h"
|
||||
#include "ui/effects/animations.h"
|
||||
@@ -112,8 +113,6 @@ class MainWidget
|
||||
: public Ui::RpWidget
|
||||
, private Media::Player::FloatDelegate
|
||||
, private base::Subscriber {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using SectionShow = Window::SectionShow;
|
||||
|
||||
@@ -124,7 +123,8 @@ public:
|
||||
|
||||
[[nodiscard]] Main::Session &session() const;
|
||||
[[nodiscard]] not_null<Window::SessionController*> controller() const;
|
||||
|
||||
[[nodiscard]] PeerData *singlePeer() const;
|
||||
[[nodiscard]] bool isPrimary() const;
|
||||
[[nodiscard]] bool isMainSectionShown() const;
|
||||
[[nodiscard]] bool isThirdSectionShown() const;
|
||||
|
||||
@@ -164,8 +164,6 @@ public:
|
||||
|
||||
void saveFieldToHistoryLocalDraft();
|
||||
|
||||
int32 dlgsWidth() const;
|
||||
|
||||
void showForwardLayer(Data::ForwardDraft &&draft);
|
||||
void showSendPathsLayer();
|
||||
void shareUrlLayer(const QString &url, const QString &text);
|
||||
@@ -231,10 +229,6 @@ public:
|
||||
Fn<void()> callback,
|
||||
const SectionShow ¶ms) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void inlineResultLoadProgress(FileLoader *loader);
|
||||
void inlineResultLoadFailed(FileLoader *loader, bool started);
|
||||
|
||||
void dialogsCancelled();
|
||||
|
||||
protected:
|
||||
@@ -340,12 +334,12 @@ private:
|
||||
int _thirdColumnWidth = 0;
|
||||
Ui::Animations::Simple _a_dialogsWidth;
|
||||
|
||||
object_ptr<Ui::PlainShadow> _sideShadow;
|
||||
const base::unique_qptr<Ui::PlainShadow> _sideShadow;
|
||||
object_ptr<Ui::PlainShadow> _thirdShadow = { nullptr };
|
||||
object_ptr<Ui::ResizeArea> _firstColumnResizeArea = { nullptr };
|
||||
object_ptr<Ui::ResizeArea> _thirdColumnResizeArea = { nullptr };
|
||||
object_ptr<Dialogs::Widget> _dialogs;
|
||||
object_ptr<HistoryWidget> _history;
|
||||
const base::unique_qptr<Dialogs::Widget> _dialogs;
|
||||
const base::unique_qptr<HistoryWidget> _history;
|
||||
object_ptr<Window::SectionWidget> _mainSection = { nullptr };
|
||||
object_ptr<Window::SectionWidget> _thirdSection = { nullptr };
|
||||
std::shared_ptr<Window::SectionMemento> _thirdSectionFromStack;
|
||||
|
Reference in New Issue
Block a user