Fix threading issue

This commit is contained in:
Maurice Parker 2021-03-25 16:28:15 -05:00
parent b5eff641d0
commit 3c2c17df0d

View File

@ -471,13 +471,15 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
} }
@objc func userDefaultsDidChange(_ note: Notification) { @objc func userDefaultsDidChange(_ note: Notification) {
if numberOfTextLines != AppDefaults.shared.timelineNumberOfLines || iconSize != AppDefaults.shared.timelineIconSize { DispatchQueue.main.async {
numberOfTextLines = AppDefaults.shared.timelineNumberOfLines if self.numberOfTextLines != AppDefaults.shared.timelineNumberOfLines || self.iconSize != AppDefaults.shared.timelineIconSize {
iconSize = AppDefaults.shared.timelineIconSize self.numberOfTextLines = AppDefaults.shared.timelineNumberOfLines
resetEstimatedRowHeight() self.iconSize = AppDefaults.shared.timelineIconSize
reloadAllVisibleCells() self.resetEstimatedRowHeight()
self.reloadAllVisibleCells()
}
self.updateToolbar()
} }
updateToolbar()
} }
@objc func contentSizeCategoryDidChange(_ note: Notification) { @objc func contentSizeCategoryDidChange(_ note: Notification) {