From 0462ade3ae46e239c7c488853d65ff8ce2325082 Mon Sep 17 00:00:00 2001 From: CMK Date: Thu, 4 Nov 2021 15:20:37 +0800 Subject: [PATCH] fix: iPad columns separator line color not update when toggle device appearance issue --- Mastodon/Scene/Root/RootSplitViewController.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mastodon/Scene/Root/RootSplitViewController.swift b/Mastodon/Scene/Root/RootSplitViewController.swift index f13383de..505e9089 100644 --- a/Mastodon/Scene/Root/RootSplitViewController.swift +++ b/Mastodon/Scene/Root/RootSplitViewController.swift @@ -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 } }