Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Fix crash when rotating (#3957)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/414709148257752/1209376796676971/f
Tech Design URL:
CC:

**Description**:
Fixes crash introduced on #3881
<!--
If at any point it isn't actively being worked on/ready for
review/otherwise moving forward strongly consider closing it (or not
opening it in the first place). If you decide not to close it, use Draft
PR while work is still in progress or use `DO NOT MERGE` label to
clarify the PRs state and comment with more information.
-->
Recreated from [already accepted
PR](#3956).

**Steps to test this PR**:
1.Test rotation to / from landscape with and without the keyboard.
Confirm that the UI updates as expected and that the keyboard remains
visible if it was visible before rotation.
2.Validate iPad behaviour remains the same.


**Definition of Done (Internal Only)**:

* [x] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

Co-authored-by: Fernando Bunn <[email protected]>
  • Loading branch information
dus7 and Bunn authored Feb 11, 2025
1 parent 715f693 commit 072b077
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DuckDuckGo/SwipeTabsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ class SwipeTabsCoordinator: NSObject {
updateLayout()
scrollToCurrent()

let indexPath = IndexPath(row: self.tabsModel.currentIndex, section: 0)
collectionView.reloadItems(at: [indexPath])
collectionView.reloadData()
}

private func updateLayout() {
Expand Down

0 comments on commit 072b077

Please sign in to comment.