Skip to content

Commit

Permalink
fix: Fix menu when switch language.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu committed Apr 24, 2024
1 parent 50d034f commit 1bfd46d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/services/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class SettingsService extends Store {

private onLocaleChanged = (lng: Locale) => {
BrowserWindow.getAllWindows().forEach(bw => bw.webContents.send('set-locale', lng))
updateApplicationMenu(null)
updateApplicationMenu(BrowserWindow.getFocusedWindow())
}

migrateDataPath() {
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-wallet/tests/services/setting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jest.mock('../../src/services/networks', () => {
jest.mock('electron', () => ({
BrowserWindow: {
getAllWindows: jest.fn().mockReturnValue([]),
getFocusedWindow: jest.fn().mockReturnValue(null),
},
}))

Expand Down

1 comment on commit 1bfd46d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 8814399265

Please sign in to comment.