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) {
if numberOfTextLines != AppDefaults.shared.timelineNumberOfLines || iconSize != AppDefaults.shared.timelineIconSize {
numberOfTextLines = AppDefaults.shared.timelineNumberOfLines
iconSize = AppDefaults.shared.timelineIconSize
resetEstimatedRowHeight()
reloadAllVisibleCells()
DispatchQueue.main.async {
if self.numberOfTextLines != AppDefaults.shared.timelineNumberOfLines || self.iconSize != AppDefaults.shared.timelineIconSize {
self.numberOfTextLines = AppDefaults.shared.timelineNumberOfLines
self.iconSize = AppDefaults.shared.timelineIconSize
self.resetEstimatedRowHeight()
self.reloadAllVisibleCells()
}
self.updateToolbar()
}
updateToolbar()
}
@objc func contentSizeCategoryDidChange(_ note: Notification) {