Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* [*] Fix an issue with comments being lost on request failure [#23942]
* [*] Fix an issue with Referrers in Stats showing invalid icons [#23943]
* [*] Update site menu style on iPhone [#23944]
* [*] Integrate zoom transitions in Themes [#23945]


25.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,13 @@ public protocol ThemePresenter: AnyObject {
presentUrlForTheme(theme, url: theme?.viewUrl(), onClose: onWebkitViewControllerClose)
}

@objc open func presentUrlForTheme(_ theme: Theme?, url: String?, activeButton: Bool = true, modalStyle: UIModalPresentationStyle = .pageSheet, onClose: (() -> Void)? = nil) {
@objc open func presentUrlForTheme(
_ theme: Theme?,
url: String?,
activeButton: Bool = true,
modalStyle: UIModalPresentationStyle = .pageSheet,
onClose: (() -> Void)? = nil
) {
guard let theme, let url = url.flatMap(URL.init(string:)) else {
return
}
Expand All @@ -870,8 +876,14 @@ public protocol ThemePresenter: AnyObject {

let webViewController = WebViewControllerFactory.controller(configuration: configuration, source: "theme_browser")
webViewController.navigationItem.rightBarButtonItem = activateButton

let navigation = UINavigationController(rootViewController: webViewController)
navigation.modalPresentationStyle = modalStyle
if #available(iOS 18, *), let indexPath = collectionView.indexPathsForSelectedItems?.first {
navigation.preferredTransition = .zoom(sourceViewProvider: { [weak self] _ in
self?.collectionView.cellForItem(at: indexPath)?.contentView
})
}

if searchController != nil && searchController.isActive {
searchController.dismiss(animated: true, completion: {
Expand Down