Skip to content

Commit

Permalink
Main thread UI means no need to timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnpn committed Sep 27, 2023
1 parent 3469b06 commit 6ed2ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Azayaka.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 35BSP6SUG9;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -315,7 +315,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 35BSP6SUG9;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
6 changes: 1 addition & 5 deletions Azayaka/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ extension AppDelegate: NSMenuDelegate {
func menuWillOpen(_ menu: NSMenu) {
if !isRecording {
updateAvailableContent(buildMenu: false)
updateTimer?.invalidate()
updateTimer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: false) { _ in
self.updateMenu()
}
RunLoop.current.add(updateTimer!, forMode: .common)
self.updateMenu()
}
}

Expand Down

0 comments on commit 6ed2ad2

Please sign in to comment.