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

Connected popup menu display to archive button display in main menu.

This commit is contained in:
23rd
2020-09-30 14:39:46 +03:00
committed by John Preston
parent 3e6ba53a04
commit ce3279143d

View File

@@ -664,7 +664,11 @@ void MainMenu::setupArchiveButton() {
) | rpl::filter([](Data::Folder *folder) {
return folder && (folder->id() == Data::Folder::kId);
}) | rpl::start_with_next([=](Data::Folder *folder) {
_archiveButton->setVisible(checkArchive());
const auto isArchiveVisible = checkArchive();
_archiveButton->setVisible(isArchiveVisible);
if (!isArchiveVisible) {
_contextMenu = nullptr;
}
update();
}, lifetime());
}