Skip to content

Commit

Permalink
Bugfix FXIOS-7768 [v120] CFRs are not displayed correctly in landscap…
Browse files Browse the repository at this point in the history
…e mode (#17338) (#17341)

* Use UIAdaptivePresentationControllerDelegate for presenting

* Set isPresenting property to true to avoid CFR dismissal

(cherry picked from commit 87f69df)

Co-authored-by: PARAIPAN SORIN <[email protected]>
  • Loading branch information
mergify[bot] and PARAIPAN9 authored Nov 17, 2023
1 parent 434967c commit 11de447
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Client/Frontend/Home/HomepageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class HomepageViewController: UIViewController, FeatureFlaggable, Themeable, Con
contextualHintViewController.stopTimer()
return
}

contextualHintViewController.isPresenting = true
present(contextualHintViewController, animated: true, completion: nil)

UIAccessibility.post(notification: .layoutChanged, argument: contextualHintViewController)
Expand Down Expand Up @@ -739,15 +739,21 @@ extension HomepageViewController: UIPopoverPresentationControllerDelegate {
popoverPresentationController.presentedViewController.dismiss(animated: false, completion: nil)
}

func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
return .none
}

func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool {
return true
}
}

// MARK: - UIAdaptivePresentationControllerDelegate
extension HomepageViewController: UIAdaptivePresentationControllerDelegate {
func adaptivePresentationStyle(
for controller: UIPresentationController,
traitCollection: UITraitCollection
) -> UIModalPresentationStyle {
.none
}
}

// MARK: FirefoxHomeViewModelDelegate
extension HomepageViewController: HomepageViewModelDelegate {
func reloadView() {
Expand Down

1 comment on commit 11de447

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

InterpreterError at template.tasks[0].extra[0].treeherder[1].symbol: unknown context value cron

Please sign in to comment.