Pass SessionNavigation to some boxes.

This commit is contained in:
John Preston
2019-07-25 20:55:11 +02:00
parent 137fa0378c
commit bacaf805b5
54 changed files with 601 additions and 233 deletions
@@ -9,6 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peer_list_box.h"
namespace Window {
class SessionController;
} // namespace Window
namespace Calls {
class BoxController
@@ -16,6 +20,9 @@ class BoxController
, private base::Subscriber
, private MTP::Sender {
public:
explicit BoxController(not_null<Window::SessionController*> window);
Main::Session &session() const override;
void prepare() override;
void rowClicked(not_null<PeerListRow*> row) override;
void rowActionClicked(not_null<PeerListRow*> row) override;
@@ -36,6 +43,8 @@ private:
std::unique_ptr<PeerListRow> createRow(
not_null<HistoryItem*> item) const;
const not_null<Window::SessionController*> _window;
MsgId _offsetId = 0;
mtpRequestId _loadRequestId = 0;
bool _allLoaded = false;