Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up iOS 14 availability checks #6333

Merged
merged 3 commits into from
Jun 23, 2022
Merged

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Jun 23, 2022

Now that the minimum deployment target is iOS 14, we can remove a bunch of availability checks. This PR contains two commits.

The first commit removes all @available(iOS 14.... This was done with a regex replace.

The second commit expands ifs and guards that involved @available(iOS 14... or #available(iOS 14.... This one I have done by hand so you probably want to look at it more closely.

Note that there are still availability checks pre-iOS14 left. I haven't touched those to note make this PR bigger than it already is.

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

@Johennes Johennes marked this pull request as draft June 23, 2022 08:12
Signed-off-by: Johannes Marbach <johannesm@element.io>
@sonarcloud
Copy link

sonarcloud bot commented Jun 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/RqMxdv

@codecov-commenter
Copy link

Codecov Report

Merging #6333 (f1d8e80) into develop (8927bff) will increase coverage by 0.00%.
The diff coverage is 13.86%.

@@            Coverage Diff            @@
##           develop    #6333    +/-   ##
=========================================
  Coverage     6.17%    6.17%            
=========================================
  Files         1440     1440            
  Lines       155408   155099   -309     
  Branches     62521    62360   -161     
=========================================
- Hits          9592     9584     -8     
+ Misses      145413   145112   -301     
  Partials       403      403            
Impacted Files Coverage Δ
Config/BuildSettings.swift 42.18% <ø> (+4.15%) ⬆️
Riot/Categories/Publisher+Riot.swift 66.66% <ø> (ø)
...t/Managers/UISIAutoReporter/UISIAutoReporter.swift 20.75% <ø> (ø)
...dules/Common/SwiftUI/VectorHostingController.swift 80.00% <ø> (ø)
...ntextMenu/ActionProviders/RoomActionProvider.swift 0.00% <0.00%> (ø)
...iot/Modules/CreateRoom/CreateRoomCoordinator.swift 0.00% <0.00%> (ø)
...t/Modules/MediaPickerV2/MediaPickerPresenter.swift 0.00% <ø> (ø)
Riot/Modules/Room/RoomCoordinator.swift 0.00% <0.00%> (ø)
...Modules/Room/Settings/RoomSettingsViewController.m 0.00% <0.00%> (ø)
...tyles/Plain/Cells/Location/LocationPlainCell.swift 0.00% <0.00%> (ø)
... and 211 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8927bff...f1d8e80. Read the comment docs.

@Johennes Johennes marked this pull request as ready for review June 23, 2022 08:57
@Johennes
Copy link
Contributor Author

@pixlwave / @ismailgulek I assigned you manually as reviewers because you seem to be around and this week might be a good one to get this large diff landed. 😅

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Thanks for doing this Johennes (and for splitting it up into smaller commits 🙏).

Looks good to me!

Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

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

LGTM!
I hope there is not a fork who wants to support pre iOS 14 :)

@Johennes Johennes merged commit 17c2b20 into develop Jun 23, 2022
@Johennes Johennes deleted the johannes/clean-up-available branch June 23, 2022 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants