mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Make scrollEdgesAppearance singular to match UIKit
This commit is contained in:
@@ -120,11 +120,11 @@ class DefaultTheme: NSObject, Theme {
|
||||
|
||||
// Protocols don't support default parameter values and a protocol extension doesn't work for @objc
|
||||
func applyStyle(onNavigationBar navigationBar: UINavigationBar) {
|
||||
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
|
||||
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgeAppearance: false)
|
||||
}
|
||||
|
||||
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
|
||||
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
|
||||
withModernScrollEdgeAppearance modernScrollEdgeAppearance: Bool) {
|
||||
navigationBar.tintColor = tintColor
|
||||
|
||||
// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
|
||||
@@ -133,7 +133,7 @@ class DefaultTheme: NSObject, Theme {
|
||||
|
||||
appearance.configureWithOpaqueBackground()
|
||||
appearance.backgroundColor = baseColor
|
||||
if !modernScrollEdgesAppearance {
|
||||
if !modernScrollEdgeAppearance {
|
||||
appearance.shadowColor = nil
|
||||
}
|
||||
appearance.titleTextAttributes = [
|
||||
@@ -141,7 +141,7 @@ class DefaultTheme: NSObject, Theme {
|
||||
]
|
||||
|
||||
navigationBar.standardAppearance = appearance
|
||||
navigationBar.scrollEdgeAppearance = modernScrollEdgesAppearance ? nil : appearance
|
||||
navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance ? nil : appearance
|
||||
} else {
|
||||
navigationBar.titleTextAttributes = [
|
||||
NSAttributedString.Key.foregroundColor: textPrimaryColor
|
||||
|
||||
Reference in New Issue
Block a user