Fix crash.

This commit is contained in:
Brent Simmons
2025-04-20 20:53:26 -07:00
parent 56bd7bb092
commit 7dc965aba6

View File

@@ -75,7 +75,9 @@ final class TimelineContainerViewController: NSViewController {
// MARK: - Notifications
@objc func userDefaultsDidChange(_ note: Notification) {
updateViewOptionsPopUpButton()
Task {
updateViewOptionsPopUpButton()
}
}
// MARK: - API
@@ -178,7 +180,7 @@ private extension TimelineContainerViewController {
return .regular // Should never get here.
}
func updateViewOptionsPopUpButton() {
@MainActor func updateViewOptionsPopUpButton() {
if AppDefaults.shared.timelineSortDirection == .orderedAscending {
newestToOldestMenuItem.state = .off
oldestToNewestMenuItem.state = .on