fix: iPad columns separator line color not update when toggle device appearance issue

This commit is contained in:
CMK 2021-11-04 15:20:37 +08:00
parent 469acd12f5
commit 0462ade3ae
1 changed files with 7 additions and 1 deletions

View File

@ -109,6 +109,12 @@ extension RootSplitViewController {
}
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
setupBackground(theme: ThemeService.shared.currentTheme.value)
}
private func updateBehavior(size: CGSize) {
if size.width > 960 {
show(.primary)
@ -136,7 +142,7 @@ extension RootSplitViewController {
private func setupBackground(theme: Theme) {
// this set column separator line color
view.backgroundColor = theme.separator
view.backgroundColor = .opaqueSeparator
}
}