From a7b3ffb815857cb2558ade3dbaa0942d3e2e6c7c Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 30 Oct 2026 21:27:16 -0700 Subject: [PATCH] Observe timelineThumbnailsDisplayDidChange notification. --- Mac/MainWindow/Timeline/TimelineViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index 65857a148..fb9f5132d 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -269,6 +269,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr override func viewDidLoad() { // The search timeline can be created long before its view loads, and defaults are observed only from here on. userDefaultsDidChange() + thumbnailsDisplay = AppDefaults.timelineThumbnailsDisplay updateCellAppearances() updateRowHeights() @@ -302,6 +303,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr NotificationCenter.default.addObserver(self, selector: #selector(handleSidebarDidAcceptDrop(_:)), name: .SidebarDidAcceptDrop, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(handleUserDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(handleTimelineThumbnailsDisplayDidChange(_:)), name: .timelineThumbnailsDisplayDidChange, object: nil) didRegisterForNotifications = true } @@ -810,6 +812,10 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr } } + @objc func handleTimelineThumbnailsDisplayDidChange(_ notification: Notification) { + thumbnailsDisplay = AppDefaults.timelineThumbnailsDisplay + } + @objc func handleBoundsDidChange(_ notification: Notification) { prefetchThumbnailsForNextScreen() } @@ -861,7 +867,6 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr private func userDefaultsDidChange() { fontSize = AppDefaults.timelineFontSize - thumbnailsDisplay = AppDefaults.timelineThumbnailsDisplay } /// The one place the row height is set — it depends on the layout and the font size.