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

Add unread unmuted counter to main menu cover.

This commit is contained in:
John Preston
2020-06-23 17:29:02 +04:00
parent 34ef54e40b
commit 7b0a32b607
12 changed files with 179 additions and 71 deletions

View File

@@ -631,9 +631,9 @@ void MainWindow::updateTrayMenu(bool force) {
void MainWindow::onShowAddContact() {
if (isHidden()) showFromTray();
if (account().sessionExists()) {
if (const auto session = account().maybeSession()) {
Ui::show(
Box<AddContactBox>(&account().session()),
Box<AddContactBox>(session),
Ui::LayerOption::KeepOther);
}
}
@@ -641,11 +641,9 @@ void MainWindow::onShowAddContact() {
void MainWindow::onShowNewGroup() {
if (isHidden()) showFromTray();
if (account().sessionExists()) {
if (const auto controller = sessionController()) {
Ui::show(
Box<GroupInfoBox>(
sessionController(),
GroupInfoBox::Type::Group),
Box<GroupInfoBox>(controller, GroupInfoBox::Type::Group),
Ui::LayerOption::KeepOther);
}
}
@@ -653,11 +651,9 @@ void MainWindow::onShowNewGroup() {
void MainWindow::onShowNewChannel() {
if (isHidden()) showFromTray();
if (account().sessionExists()) {
if (const auto controller = sessionController()) {
Ui::show(
Box<GroupInfoBox>(
sessionController(),
GroupInfoBox::Type::Channel),
Box<GroupInfoBox>(controller, GroupInfoBox::Type::Channel),
Ui::LayerOption::KeepOther);
}
}