Skip to content

Commit

Permalink
Refactor FXIOS [Clean up] Remove unused Tab show and hide content (#2…
Browse files Browse the repository at this point in the history
…4618)

We never hideContent, so showContent is not needed as well
  • Loading branch information
lmarceau authored Feb 7, 2025
1 parent 6e80a96 commit c2f5244
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ extension BrowserViewController: ReaderModeDelegate {
// Update reader mode state if is the selected tab. Otherwise it will update once is active
if tabManager.selectedTab === tab {
self.showReaderModeBar(animated: true)
tab.showContent(true)
}
}

Expand Down
22 changes: 0 additions & 22 deletions firefox-ios/Client/TabManagement/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -800,28 +800,6 @@ class Tab: NSObject, ThemeApplicable, FeatureFlaggable, ShareTab {
return contentScriptManager.getContentScript(name)
}

func hideContent(_ animated: Bool = false) {
webView?.isUserInteractionEnabled = false
if animated {
UIView.animate(withDuration: 0.25, animations: { () in
self.webView?.alpha = 0.0
})
} else {
webView?.alpha = 0.0
}
}

func showContent(_ animated: Bool = false) {
webView?.isUserInteractionEnabled = true
if animated {
UIView.animate(withDuration: 0.25, animations: { () in
self.webView?.alpha = 1.0
})
} else {
webView?.alpha = 1.0
}
}

func addLoginAlert(_ alert: SaveLoginAlert) {
// Only one login alert can show per tab
guard loginAlert == nil else { return }
Expand Down

0 comments on commit c2f5244

Please sign in to comment.