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:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user