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

iOS: hide home indicator on devices without a home button #248

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

knbx
Copy link

@knbx knbx commented Dec 28, 2021

Swiftfin already contains a workaround to hide the home indicator, but this doesn't work any more.

The author of the workaround updated their gist with a workaround for SwiftUI lifecycle. I've applied these changes to Swiftfin.

Some things to note:

  • The new workaround uses swizzling to point iOS to the right PreferenceUIHostController. Swizzling is generally considered a last resort and likely to break in future iOS versions.

  • The gist uses a separate pod to do swizzling. Swiftfin seems light on dependencies, we could look into implementing the swizzling within the repo. Personally I wouldn't, since this swizzling should be replaced by a better solution when available. The pod dependency can help as a reminder to remove it.

  • I'm new to SwiftUI, so I hope I didn't commit any basic mistakes. I added the new wrapper view in VideoPlayer.swift and had to update the edge insets to ignore the safe area.

Anyway, let me know what you think.

Uses the latest version of the tweak already in Swiftfin (sourced in comments). Swizzles to make iOS query the child view
@knbx knbx requested a review from acvigue as a code owner December 28, 2021 11:01
@sonarcloud
Copy link

sonarcloud bot commented Dec 28, 2021

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 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@LePips
Copy link
Member

LePips commented Dec 28, 2021

There is some cleanup that can be done with this now but I can get to that.

@anthonylavado anthonylavado removed the request for review from acvigue December 28, 2021 16:23
@LePips LePips merged commit e395cd1 into jellyfin:main Dec 28, 2021
@buggerman
Copy link

Am I supposed to do anything for the workaround? Because the Home bar never hides itself for me in the version on AppStore right now.

@knbx
Copy link
Author

knbx commented May 28, 2023

This fix pre-dates the recent big refactor. I haven't had the time to take another look at this

@LePips
Copy link
Member

LePips commented May 28, 2023

The big refactor fixes it and just needs to be released after some things have been polished.

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.

None yet

3 participants