Skip to content

Commit

Permalink
Bugfix FXIOS-9859 Don’t call apply theme for every tab (#22746)
Browse files Browse the repository at this point in the history
Don’t call apply theme for every tab
  • Loading branch information
OrlaM authored Oct 24, 2024
1 parent 8a64c92 commit 1193861
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3049,14 +3049,7 @@ class BrowserViewController: UIViewController,
webViewContainerBackdrop.backgroundColor = currentTheme.colors.layer3
setNeedsStatusBarAppearanceUpdate()

// Update the `background-color` of any blank webviews.
let webViews = tabManager.tabs.compactMap({ $0.webView })
webViews.forEach({ $0.applyTheme(theme: currentTheme) })

let tabs = tabManager.tabs
tabs.forEach {
$0.applyTheme(theme: currentTheme)
}
tabManager.selectedTab?.applyTheme(theme: currentTheme)

if !isToolbarRefactorEnabled {
let isPrivate = tabManager.selectedTab?.isPrivate ?? false
Expand Down
1 change: 1 addition & 0 deletions firefox-ios/Client/TabManagement/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ class Tab: NSObject, ThemeApplicable, FeatureFlaggable {

func applyTheme(theme: Theme) {
UITextField.appearance().keyboardAppearance = theme.type.keyboardAppearence(isPrivate: isPrivate)
webView?.applyTheme(theme: theme)
}

// MARK: - Static Helpers
Expand Down

0 comments on commit 1193861

Please sign in to comment.