2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix logouting from the passcode.

This commit is contained in:
John Preston
2020-06-16 18:19:23 +04:00
parent ba103fdd40
commit c83659f0c7
9 changed files with 85 additions and 73 deletions

View File

@@ -358,6 +358,32 @@ MainWidget::MainWidget(
Core::UpdateChecker checker;
checker.start();
}
auto &api = session().api();
api.requestNotifySettings(MTP_inputNotifyUsers());
api.requestNotifySettings(MTP_inputNotifyChats());
api.requestNotifySettings(MTP_inputNotifyBroadcasts());
cSetOtherOnline(0);
session().user()->loadUserpic();
auto &local = session().local();
local.readInstalledStickers();
local.readFeaturedStickers();
local.readRecentStickers();
local.readFavedStickers();
local.readSavedGifs();
auto &data = session().data();
if (const auto availableAt = local.readExportSettings().availableAt) {
data.suggestStartExport(availableAt);
}
auto &stickers = data.stickers();
stickers.notifyUpdated();
stickers.notifySavedGifsUpdated();
_history->start();
Core::App().checkStartUrl();
}
MainWidget::~MainWidget() = default;
@@ -2498,7 +2524,7 @@ void MainWidget::updateWindowAdaptiveLayout() {
// dialogs widget to provide a wide enough chat history column.
// Don't shrink the column on the first call, when window is inited.
if (layout.windowLayout == Adaptive::WindowLayout::ThreeColumn
&& _started && _controller->widget()->positionInited()) {
&& _controller->widget()->positionInited()) {
//auto chatWidth = layout.chatWidth;
//if (_history->willSwitchToTabbedSelectorWithWidth(chatWidth)) {
// auto thirdColumnWidth = _history->tabbedSelectorSectionWidth();
@@ -2547,39 +2573,6 @@ void MainWidget::searchInChat(Dialogs::Key chat) {
}
}
void MainWidget::start() {
auto &api = session().api();
api.requestNotifySettings(MTP_inputNotifyUsers());
api.requestNotifySettings(MTP_inputNotifyChats());
api.requestNotifySettings(MTP_inputNotifyBroadcasts());
cSetOtherOnline(0);
session().user()->loadUserpic();
_started = true;
auto &local = session().local();
local.readInstalledStickers();
local.readFeaturedStickers();
local.readRecentStickers();
local.readFavedStickers();
local.readSavedGifs();
auto &data = session().data();
if (const auto availableAt = local.readExportSettings().availableAt) {
data.suggestStartExport(availableAt);
}
auto &stickers = data.stickers();
stickers.notifyUpdated();
stickers.notifySavedGifsUpdated();
_history->start();
Core::App().checkStartUrl();
}
bool MainWidget::started() {
return _started;
}
void MainWidget::openPeerByName(
const QString &username,
MsgId msgId,