2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Keep separate MTP::Config's for separate accounts.

This commit is contained in:
John Preston
2020-06-17 13:36:25 +04:00
parent 63cdda2df7
commit 357caf8007
142 changed files with 1901 additions and 1263 deletions

View File

@@ -516,7 +516,7 @@ bool MainWindow::doWeMarkAsRead() {
if (!_main || Ui::isLayerShown()) {
return false;
}
updateIsActive(0);
updateIsActive();
return isActive() && _main->doWeMarkAsRead();
}
@@ -609,7 +609,7 @@ void MainWindow::updateTrayMenu(bool force) {
auto minimizeAction = actions.at(1);
minimizeAction->setEnabled(isVisible());
} else {
updateIsActive(0);
updateIsActive();
auto active = Platform::IsWayland() ? isVisible() : isActive();
auto toggleAction = actions.at(0);
disconnect(toggleAction, SIGNAL(triggered(bool)), this, SLOT(minimizeToTray()));
@@ -705,7 +705,7 @@ void MainWindow::activate() {
setVisible(true);
psActivateProcess();
activateWindow();
updateIsActive(Global::OnlineFocusTimeout());
controller().updateIsActiveFocus();
if (wasHidden) {
if (_main) {
_main->windowShown();
@@ -743,7 +743,7 @@ void MainWindow::showFromTray(QSystemTrayIcon::ActivationReason reason) {
void MainWindow::handleTrayIconActication(
QSystemTrayIcon::ActivationReason reason) {
updateIsActive(0);
updateIsActive();
if (Platform::IsMac() && isActive()) {
if (trayIcon && !trayIcon->contextMenu()) {
showFromTray(reason);