fix: recentDocuments on macOS not working (#41978)
This commit is contained in:
parent
ef097b77ad
commit
441dbda833
2 changed files with 4 additions and 2 deletions
|
@ -26,8 +26,6 @@ class ElectronMenuModel;
|
|||
@protected
|
||||
base::WeakPtr<electron::ElectronMenuModel> model_;
|
||||
NSMenu* __strong menu_;
|
||||
NSMenuItem* __strong recentDocumentsMenuItem_;
|
||||
NSMenu* __strong recentDocumentsMenuSwap_;
|
||||
BOOL isMenuOpen_;
|
||||
BOOL useDefaultAccelerator_;
|
||||
base::OnceClosure closeCallback;
|
||||
|
|
|
@ -31,10 +31,14 @@ using SharingItem = electron::ElectronMenuModel::SharingItem;
|
|||
|
||||
namespace {
|
||||
|
||||
static NSMenuItem* __strong recentDocumentsMenuItem_;
|
||||
static NSMenu* __strong recentDocumentsMenuSwap_;
|
||||
|
||||
struct Role {
|
||||
SEL selector;
|
||||
const char* role;
|
||||
};
|
||||
|
||||
Role kRolesMap[] = {
|
||||
{@selector(orderFrontStandardAboutPanel:), "about"},
|
||||
{@selector(hide:), "hide"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue