Skip to content

fix(orientation): let tablets rotate outside the full player - #807

Closed
kevenchantre wants to merge 8 commits into
mornyeapp:mainfrom
kevenchantre:tablet-landscape
Closed

kevenchantre wants to merge 8 commits into
mornyeapp:mainfrom
kevenchantre:tablet-landscape

Conversation

@kevenchantre

@kevenchantre kevenchantre commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every page except the full player was locked to portrait on all touch devices, so a tablet held in landscape turned back to portrait as soon as the player closed (#805, reported on a Redmi Pad 2). The comment on setAppOrientation already said only phones should behave this way, and the layouts already adapt to wide screens.

  • Tablets now allow every orientation on every page. A tablet is a device whose display's shorter side is at least 600 logical pixels (Material's medium window class, Android's sw600dp). This is judged by the display rather than the window, so split screen and resizing don't change it.
  • MainActivity.onCreate applies the same rule at launch (SCREEN_ORIENTATION_FULL_USER when smallestScreenWidthDp >= 600, which respects the system rotation lock), so a tablet held in landscape no longer flips to portrait before Flutter takes over.
  • Unchanged: phones keep portrait pages with a rotating full player, TV stays landscape, and sheets and dialogs still inherit the page underneath.

Related Issues

Fixes #805

Type of Change

  • Bug fix
  • Feature
  • Performance improvement
  • Refactor with no intended behavior change
  • Tests, build, or repository maintenance
  • Documentation or localization

Validation

  • dart format --output=none --set-exit-if-changed lib test integration_test
  • flutter analyze
  • flutter test
  • bash scripts/check_rust_backend.sh
  • Android or iOS native checks
  • Manual reproduction or device test

Validation notes:

  • test/app_orientation_test.dart passes (9 tests). New cases: tablets rotate on every page and in the player; tablets keep rotating after the player closes; a TV is never treated as a tablet; the 600 dp display threshold classifies a phone in both orientations and two tablet sizes correctly. Existing phone and TV cases are unchanged.
  • No Rust code changed.

Contributor Checklist

  • This PR is focused and contains no unrelated changes.
  • Extension-specific behavior, if any, uses a generic capability or manifest contract.
  • User-facing strings, documentation, and generated files are updated where needed.
  • No credentials, downloaded media, or build artifacts are included.

claude and others added 8 commits October 31, 2026 23:03
… document URI

When the download result carried no file name, the converted name was taken from the last segment of the SAF
content URI, i.e. the percent-encoded document id ('primary%3AMusic%2FAlbum%2FSong.opus'). The name is now the
part of the document id after the last '/' and ':' ('Song.opus'). Regular file paths are unchanged.
Every page except the full player was locked to portrait on all touch
devices, so a tablet held in landscape turned back to portrait when the
player closed. The layouts already adapt to wide screens.

Tablets (a display whose shorter side is at least 600 logical pixels,
judged by the display so split screen does not change it) now allow
every orientation on every page. Android's MainActivity applies the
same rule at launch, before Flutter takes over. Phones keep portrait
pages with a rotating full player, and TV stays landscape.

Fixes mornyeapp#805
zarzet added a commit that referenced this pull request Nov 5, 2026
Tablets (shortest side at least 600dp) may use every orientation outside
the full player, and the activity starts with the user's rotation setting
on them. Phones and TV keep their existing rules.

Contributed by Keven Chantre in #807. Fixes #805.
zarzet added a commit that referenced this pull request Nov 5, 2026
Tablets (shortest side at least 600dp) may use every orientation outside
the full player, and the activity starts with the user's rotation setting
on them. Phones and TV keep their existing rules.

Contributed by Keven Chantre in #807. Fixes #805.
@zarzet zarzet closed this Nov 5, 2026
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.

[Bug]: app rotates to potrait when even when I am in landscape mode in my tablet

3 participants