mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-07 04:05:17 +00:00
Merge tag 'v7.0.4' into dev
This commit is contained in:
@@ -151,10 +151,16 @@ void Controller::showAccount(
|
||||
MsgId singlePeerShowAtMsgId) {
|
||||
Expects(isPrimary() || _id.account == account);
|
||||
|
||||
const auto prevAccount = _id.account;
|
||||
const auto prevSession = maybeSession();
|
||||
const auto prevSessionUniqueId = prevSession
|
||||
? prevSession->uniqueId()
|
||||
: 0;
|
||||
const auto accountBeforeIntro = (prevAccount
|
||||
&& prevAccount != account
|
||||
&& prevAccount->sessionExists())
|
||||
? prevAccount
|
||||
: nullptr;
|
||||
_accountLifetime.destroy();
|
||||
_id.account = account;
|
||||
Core::App().checkWindowId(this);
|
||||
@@ -223,7 +229,7 @@ void Controller::showAccount(
|
||||
session->updates().updateOnline(crl::now());
|
||||
} else {
|
||||
sideBarChanged();
|
||||
setupIntro(std::move(oldContentCache));
|
||||
setupIntro(accountBeforeIntro, std::move(oldContentCache));
|
||||
_widget.updateGlobalMenu();
|
||||
}
|
||||
|
||||
@@ -400,8 +406,13 @@ void Controller::clearSetupEmailLock() {
|
||||
_widget.clearSetupEmailLock();
|
||||
}
|
||||
|
||||
void Controller::setupIntro(QPixmap oldContentCache) {
|
||||
_widget.setupIntro(Intro::EnterPoint::Qr, std::move(oldContentCache));
|
||||
void Controller::setupIntro(
|
||||
Main::Account *accountBeforeIntro,
|
||||
QPixmap oldContentCache) {
|
||||
_widget.setupIntro(
|
||||
Intro::EnterPoint::Qr,
|
||||
accountBeforeIntro,
|
||||
std::move(oldContentCache));
|
||||
}
|
||||
|
||||
void Controller::setupMain(
|
||||
@@ -466,10 +477,18 @@ void Controller::hideSettingsAndLayer(anim::type animated) {
|
||||
_widget.ui_hideSettingsAndLayer(animated);
|
||||
}
|
||||
|
||||
bool Controller::closeLayerByBackButton() {
|
||||
return _widget.closeLayerByBackButton();
|
||||
}
|
||||
|
||||
bool Controller::isLayerShown() const {
|
||||
return _widget.ui_isLayerShown();
|
||||
}
|
||||
|
||||
rpl::producer<bool> Controller::boxShownValue() const {
|
||||
return _widget.ui_boxShownValue();
|
||||
}
|
||||
|
||||
void Controller::sideBarChanged() {
|
||||
_widget.recountGeometryConstraints();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user