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

Navigation back event fixes for landscape orientation #398

Merged
merged 2 commits into from
May 26, 2023

Conversation

tim-crisp
Copy link
Contributor

@tim-crisp tim-crisp commented Oct 29, 2022

Closes #393.

When a live stream activity is created in landscape mode, I would expect that a back navigation would cause the live stream itself to be closed and not to be put in portrait mode (as it did in v2.10.3). In v2.10.4 as part of the StreamFragment refactor, the isFullscreen boolean was previously used to determine whether to toggle fullscreen or not when a back navigation event occurred. In version v2.10.3 the isFullscreen flag would only ever change if the user was to manually switch to fullscreen. As part of the v2.10.4 refactor, this now relies on dynamically evaluating the current orientation without considering the users initial orientation. I've introduced StreamFragment#getInitialOrientation which exposes the initial orientation at the point of which a StreamFragment was created. This is then used in StreamActivity#onBackPressed to determine whether we should be toggling full screen or not given the current orientation is landscape.
Visual Representation:
image

I've also reduced the minimum chat size threshold to better cater for larger tablets.

FYI: I don't often write OOP and have only ever worked on personal android apps.

@tim-crisp tim-crisp changed the title Tablet fixes Navigation back event fixes for landscape orientation Oct 29, 2022
@samfundev samfundev merged commit 43d155b into twireapp:master May 26, 2023
2 checks passed
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.

App keeps switching my tablet to Portrait mode
2 participants