mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
Move some calls from App namespace.
This commit is contained in:
@@ -18,6 +18,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_peer.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_session.h"
|
||||
#include "auth_session.h"
|
||||
#include "window/window_controller.h"
|
||||
|
||||
namespace Info {
|
||||
@@ -26,7 +28,7 @@ namespace {
|
||||
not_null<PeerData*> CorrectPeer(PeerId peerId) {
|
||||
Expects(peerId != 0);
|
||||
|
||||
auto result = App::peer(peerId);
|
||||
const auto result = Auth().data().peer(peerId);
|
||||
if (const auto to = result->migrateTo()) {
|
||||
return to;
|
||||
}
|
||||
@@ -84,6 +86,11 @@ rpl::producer<QString> AbstractController::mediaSourceQueryValue() const {
|
||||
return rpl::single(QString());
|
||||
}
|
||||
|
||||
AbstractController::AbstractController(not_null<Window::Controller*> parent)
|
||||
: Navigation(&parent->session())
|
||||
, _parent(parent) {
|
||||
}
|
||||
|
||||
PeerId AbstractController::peerId() const {
|
||||
if (const auto peer = key().peer()) {
|
||||
return peer->id;
|
||||
@@ -117,7 +124,7 @@ Controller::Controller(
|
||||
, _widget(widget)
|
||||
, _key(memento->key())
|
||||
, _migrated(memento->migratedPeerId()
|
||||
? App::peer(memento->migratedPeerId()).get()
|
||||
? Auth().data().peer(memento->migratedPeerId()).get()
|
||||
: nullptr)
|
||||
, _section(memento->section()) {
|
||||
updateSearchControllers(memento);
|
||||
|
Reference in New Issue
Block a user